Ergodic literature is a term coined by Espen J. Aarseth in his book Cybertext—Perspectives on Ergodic Literature, and is derived from the Greek words ergon, meaning "work", and hodos, meaning "path". Aarseth's book contains the most commonly cited definition:
In ergodic literature, nontrivial effort is required to allow the reader to traverse the text. If ergodic literature is to make sense as a concept, there must also be nonergodic literature, where the effort to traverse the text is trivial, with no extranoematic responsibilities placed on the reader except (for example) eye movement and the periodic or arbitrary turning of pages.
Cybertext is a subcategory of ergodic literature that Aarseth defines as "texts that involve calculation in their production of scriptons."  The process of reading printed matter, in contrast, involves "trivial" extranoematic effort, that is, merely moving one's eyes along lines of text and turning pages. Thus, hypertext fiction of the simple node and link variety is ergodic literature but not cybertext. A non-trivial effort is required for the reader to traverse the text, as the reader must constantly select which link to follow, but a link, when clicked, will always lead to the same node. A chat bot such as ELIZA is a cybertext because when the reader types in a sentence, the text-machine actually performs calculations on the fly that generate a textual response. The I Ching is likewise cited as an example of cybertext because it contains the rules for its own reading. The reader carries out the calculation but the rules are clearly embedded in the text itself.
It has been argued that these distinctions are not entirely clear and scholars still debate the fine points of the definitions.
One of the major innovations of the concept of ergodic literature is that it is not medium-specific. New media researchers have tended to focus on the medium of the text, stressing that it is for instance paper-based or electronic. Aarseth broke with this basic assumption that the medium was the most important distinction, and argued that the mechanics of texts need not be medium-specific. Ergodic literature is not defined by medium, but by the way in which the text functions. Thus, both paper-based and electronic texts can be ergodic: "The ergodic work of art is one that in a material sense includes the rules for its own use, a work that has certain requirements built in that automatically distinguishes between successful and unsuccessful users." 
The examples Aarseth gives include a diverse group of texts: wall inscriptions of the temples in ancient Egypt that are connected two-dimensionally (on one wall) or three dimensionally (from wall to wall or room to room); the I Ching; Apollinaire’s Calligrammes in which the words of the poem “are spread out in several directions to form a picture on the page, with no clear sequence in which to be read”; Marc Saporta’s Composition No. 1, Roman, a novel with shuffleable pages; Raymond Queneau’s One Hundred Thousand Billion Poems; B. S. Johnson’s The Unfortunates; Milorad Pavic’s Landscape Painted with Tea; Joseph Weizenbaum’s ELIZA; Ayn Rand’s play Night of January 16th, in which members of the audience form a jury and choose one of two endings; William Chamberlain and Thomas Etter’s Racter; Michael Joyce’s Afternoon: a story; Roy Trubshaw and Richard Bartle’s Multi-User Dungeon (aka MUD1); and James Aspnes’s TinyMUD. Some other contemporary examples of this type of literature are Nick Bantock's The Griffin and Sabine Trilogy, S. by J. J. Abrams and Doug Dorst, Night Film by Marisha Pessl, and House of Leaves by Mark Z. Danielewski.
All these examples require non-trivial effort from the reader, who must participate actively in the construction of the text.
The concepts of cybertext and ergodic literature were of seminal importance to new media studies, in particular literary approaches to digital texts and to game studies.