Marvin is the ship's robot aboard the starship Heart of Gold. He was built as a prototype of Sirius Cybernetics Corporation's "Genuine People Personalities" technology. Marvin is apparently afflicted with severe depression and boredom, in part because he has a "brain the size of a planet" which he is seldom allowed to use. Indeed, the true horror of Marvin's existence is that no task he could be given would occupy even the tiniest fraction of his vast intellect. Marvin claims he is 50,000 times more intelligent than a human, though this is, if anything, a vast underestimate. When kidnapped by the bellicose Krikkit robots and tied to the interfaces of their intelligent war computer, Marvin simultaneously manages to plan the entire planet's military strategy, solve "all of the major mathematical, physical, chemical, biological, sociological, philosophical, etymological, meteorological and psychological problems of the Universe except his own, three times over," and compose a number of lullabies. He seemed to find the latter the hardest.
http://www.acm.uiuc.edu/errors/404.html