Hacker News new | past | comments | ask | show | jobs | submit login

Has anyone programmed an AI to win Nethack? It seems like an obvious thing to try.



Yes!

https://github.com/krajj7/BotHack

https://www.reddit.com/r/nethack/comments/2tluxv/yaap_fullau...

Edit: I remember looking at BotHack at the time and being surprised at how extensively and elaborately hard-coded the strategy and evaluations were. This is definitely not machine learning!

Edit 2: HN discussion at the time: https://news.ycombinator.com/item?id=8990869


I found the source code to be absolutely fascinating, beautifully written, easy to parse and understand why and how various actions will happen.

Here's an example method: https://github.com/krajj7/BotHack/blob/master/src/bothack/be...

    (defn- read-book [game]
      {:pre [(have game book #{:noncursed})]}
      (if-not (invocation-complete? game)
        (if-let [[slot _] (have game "Book of the Dead")]
          (with-reason "reading the book"
            (->Read slot)))))


Has anyone programmed an AI to win Nethack? It seems like an obvious thing to try.

There's a long history of using bots (they weren't really smart enough to be called AI, but they did "learn") to play games like this.

Long before Nethack there was Rogue. And then, 37 years ago, there was Rog-O-Matic. As Wiki describes it:

Rog-O-Matic is a bot developed in 1981 to play and win the computer game Rogue ...

Described as a "belligerent expert system", Rog-O-Matic performs well when tested against expert Rogue players, even winning the game.

https://en.wikipedia.org/wiki/Rog-O-Matic




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: