Using AI to drive text adventures / rogues has been pretty popular for a while now - I remember seeing a pretty dismal performance (although it was over a year ago) where somebody was trying to use an LLM to drive a game of Zork.
Related HN post from about 6 months ago
Evaluating LLMs Playing Text Adventures
In fact, this was one of the very first things I did when Chat-GPT was first released to the public. It was impressive, but far from perfect. It's still not quite there.