I was thinking of creating a text adventure game and after a small google search, I found out that quite a few (simple) text adventure games are created in Prolog.Why is that?
Text Adventure language
programming languages
From Exploring Prolog:As I was writing the utility functions for my game, I happened to go to a Boston Computer Society meeting where the speaker was discussing Prolog. I learned that all of the tools I was building were already integral components of the Prolog language.Prolog has built-in dynamic memory allocation for storing the state of  the game that was better than mine because it had an extremely  flexible way of representing the data. It has a built-in  pattern-matching capability (unification) that was more general and  flexible than the pattern-matcher I was implementing, and it had a  built-in search mechanism (backtracking). Further, the dynamic memory  allocation didn't just store facts, but stored rules as well, so the  data could embody its own intelligence.Because of all of this procedural power built into the language, the  code the programmer writes looks much more declarative. An  application, such as my adventure game, winds up being reduced to an  elegant set of logical declarations describing what the program does.  (Developers often claim up to a 10-fold reduction in code size going  to Prolog. See for example the PCAI article on KnowledgeWare's use of  Prolog in the May/June 1993 issue.) For me, this was truly a fun way  to program, capturing the essence of the joy of programming-building  logical structures that perform interesting tasks.