Hex is the Unseen University's organic/inorganic/magical super-computer, located in the High Energy Magic Building, whose initial components were a mouse-wheel and an ant-colony (the sum in this case is far greater than the parts) tended by Ponder Stibbons and a group of like-minded, spotty, if-only-we-had-anoraks undergraduates. As Stibbons states it, operating Hex is largely intuitive, although you have to spend a lot of time learning it first. Hex can be cranky, recalcitrant, demand more cheese, occasionally be of use, and exhibit disturbing signs of sentience. Apart from the odd banana, not too much difference from here. Hex makes a major appearance in Interesting Times, Hogfather and The Science of Discworld, where it helped facilitate the Roundworld project, and has also been used at other times to do complicated calculations for how exactly a spell is to be performed, or to control the operations of complicated magical instruments.
Hex is started by initialising the GBL (pulling the Great Big Lever), and is basically a thinking-engine. Some people may think that Hex is alive, but Ponder Stibbons soothes his mind on that subject, telling himself that Hex "only thinks that he is alive". Hex started its existence as a very large calculator, using different movements of ants to solve simple math equations, but Hex eventually changed to something much more. Hex now seems to have a life of its own, changing, removing and even adding new parts to itself all the time. It now has an Anthill Inside sticker, a beehive in the next room (for memory storage), a screensaver (an aquarium on a spring), a beach-ball-like thing that goes "parp" every fourteen minutes. Hex has a large number of logic states, in addition to and, or, and their combinations and variants, Hex can use maybe, perhaps, suppose, and why, allowing it to think the unthinkable quite easily, such as expanding its capacity to understand the creation of Roundworld on the basis that one day it would be able to. Hex is even beginning to ask about electricity.
Hex is able to cast a huge amount of spells in a very small amount of time (similar to early computers that were used to do multiple calculations in a short space of time), thus reducing the need for humans to do so (a source of disgruntlement to the Faculty) and garnering results that it would take a team of research wizards weeks, months or even years to get. For instance, Hex casts the spells required to create Roundworld in less than a minute, when the Dean predicted it would take months.
Hex was unfortunately sent daft by a conversation with the Bursar during Hogfather. This was cured soon after by Mustrum Ridcully with the use of dried frog pills (Ridcully wrote, hurriedly, "L-O-T-S-O-F-D-R-Y-D-F-R-O-R-G-P-¼-L-L-S"). If Hex believes what it's told, and it's told that it's had lots of Dried Frog Pills, then Hex will believe that it's had lots of Dried Frog Pills. This appears to be a reference to an early computer virus that caused the computer to display a message "Computer wants a Cookie", and freeze until "COOKIE" or "HAVECOOKIE" was typed in. As described by guerrilla ontologist Robert Anton Wilson, this was frequently done to large mainframes in the USA in the 1960s and 1970s: the response of the computer to the prompt "COOKIE" was usually "Yummy, that was good" followed by a return to normal programming.
Also during Hogfather, Hex revealed that it has the ability to believe in things such as the Hogfather, and even wrote a list to the Hogfather. Death (who was the stand-in for the Hogfather at the time) had no idea what most of the items were, but apparently succeeded in giving Hex its new FTB (which was abbreviated, to the embarrassment of Stibbons, from Fluffy Teddy Bear) and now Hex throws a tantrum whenever the FTB is taken away.
Hex has also been tied to the clacks network, creating the Disc's first modem. Hex was able to crack the clacks codes used by, say, the Assassins' Guild or Fools' Guild, and adding them to a message it sends. In fact, Hex recently cracked the Grand Trunk's code, allowing its messages to be read as part of their internal signalling. Every week, Hex then sends a message to company headquarters to readjust the number of messages sent. The wizards take advantage of this (at least, after they find out about it) to send a long message to Lancre in The Science of Discworld II: the Globe.
Hex is Ponder Stibbons' main field of work (technically making him the Disc's only I.T. expert), but Stibbons is constantly worried about it. Stibbons never knows what's going to happen next with Hex, and sometimes even catches himself calling Hex "he", which is, of course, ridiculous, as Hex is a machine.
An early prototype of Hex, albeit on the Roundworld, appears in Short Story:The Megabyte Drive to Believe in Santa Claus.
Using ant colonies as an analogy to solve computational problems is a widespread method in evolutionary computing. A good example, based on observations of real ant colonies, is Gambardella, L.M., Dorigo, M.: Solving symmetric and asymmetric TSPs by ant colonies. Evolutionary Computing 1996. It is difficult to ascertain if Hex or these approaches were first, probably some feedback through L-Space is to blame for this.
A lot of the technical jargon that Ponder and the team use around Hex is based on computer-speak on Roundworld.
- There is a motto attached to Hex saying Anthill Inside, a reference to Intel Inside.
- Hex apparently requires "a lot of small religious pictures". This is a reference to computer icons.
- Hex's words, all written on a bit of paper using a quill on a complicated arm system, usually have three + symbols before and after the actual words, an example being:
+++Error. Redo From Start+++ (Although, none of the wizards can find out who Redo is or where Start is.)
(This may be an allusion to the Hayes command set codes, originally for modems, which used +++ to switch between data mode and command mode. This resulted in commands and representations of them often being prefixed with the switch string, such as the commonly seen +++ATH0, meaning "switch to command mode and hang up the connection".) And at the same time, this serves as a primitive prínter.
- Sometimes when Hex is baffled by a question, it produces random error messages - as incomprehensible as Roundworld computers' "An error of type 5307 has occured.' or '[Something] failure', but with a more arcane bent. 'Eternal domain error' = 'Internal domain error'. Sometimes an error message displays the memory address of an error, whereas Hex posted "Error at Address: 14 Treacle Mine Road" - possibly the address of CMOT Dibbler.
- The "Redo from start" error message is based on a real error message from early versions of the BASIC programming language. As this particular error message is confusing even to highly experienced hackers, it is often cited as the canonical example of a user-hostile error message.
- While Hex is pondering a question, it will shut down all other functions, and an hourglass on a spring will descend and slowly turn, indicating that its runtime is being applied to the issue. This is akin to the cursor transforming into a picture of an hourglass in some OSs.
- Hex occasionally demands cheese for his/its mouse. If the mouse is not fed, Hex stops working. This is a reference to the Roundworld 'mouse', which controls the cursor.
- Another interesting fact is that if Hex's FTB (Fluffy Teddy Bear, a gift from the Hogfather) is removed, Hex writes +++Mine! Waah!+++, once again implying sapience. The fact that Hex even believed in the Hogfather is proof of Hex's increasing "mind".
- Also, when asked "Why?", it was predicted that Hex would either blow up or say something like "+++Out Of Cheese Error ???????+++", but instead, Hex wrote "Because". When the question was followed by "Why anything?", Hex responded with "Because everything", then immediately 'crashed'. This is a reference to the episode 'The General' of the ATV TV Series The Prisoner, where the question destroyed a computer.
- The +++Divide by cucumber error+++ This may be a oblique reference to Academy of Lagodo in Gulliver's Travels where one of their plans was to capture the sunlight in cucumbers.
- The conversation between Hex and the Bursar is a reference to Joseph Weizenbaum's computer program ELIZA..
- When Hex appears to 'catch' the Bursar's daftness, its behaviour may echo the Red Dwarf concept of 'computer senility': an android which had contracted it preferred to be known as 'Rameses Niblick III Kerplunk Kerplunk Whoops! Where's My Thribble?' - Hex says 'Whoops! Here comes Mr Jelly!'.
- Hex is powered by a waterwheel hidden in a sheep's skull - with other words a RAM.
"To put a hex on" is described in Roget's Thesaurus (1976 edition) as a local US phrase, meaning to "curse". Possibly of German origin, from hexen - witch.
Ref "Computer wants a cookie" above: Robert Anton Wilson reported several variants on this game, which he noted depended a lot on a pretty accurate assessment of the Bohemian tendencies of computing students who tended the mainframes and did routine programming during the night shift. A variation might be the sudden appearance of a seditious phrase or slogan, like
"The Government sucks!"
"Nixon's a crook!"
which totally locked the computer and were impervious to all forms of debugging. The only solution was to agree:
"It sure does!" or "He sure is!" after which the mainframe would go back to normal operations.
Other gambits were "Hey man, what's your sign?" which prompted a discourse on astrology, or "Scored any good dope lately?" - to which, again, the only permissible reply was "yes indeedy!"