Live data from Hacker News

First NetHack bot ascension

reddit.com

51–60 of 89 posts

Re: First NetHack bot ascension

#51
post #41

Earlier quoted context omitted.

> The problem with the Hawaiian shirt is that shop keepers will assume you're a tourist, and charge you extra. Absolutely cannot tell if you're fucking with me, or if this is an actual game mechanic - and if so, why this shirt would be desirable.

> Absolutely cannot tell if you're fucking with me, or if this is an actual game mechanic Welcome to the world of nethack! The amount of special case situations that have been programmed into this game over the last few decades are truly amazing. (Mostly because it somehow still works.) I still remember the first time I ran into a kitchen sink.

NetHacks DevTeam are so famous for their special cases that the TVTropes article for obscure special cases was named after them. Here's the subarticle for NetHack examples:

http://tvtropes.org/pmwiki/pmwiki.php/TheDevTeamThinksOfEver...

Re: First NetHack bot ascension

#52
post #7

At the risk of losing my nerd card, I've never played Nethack. I read the reddit thread, and while it was in English, it made not a lick of sense to me. Now I know how non-engineers feel sometimes. :) BTW, can someone tell me why this is such an amazing accomplishment? I know Nethack is very old, so is this a case of a complex problem space or just no one has tried before?

I'd like to echo comments made elsewhere that this is a game-AI result so exciting that it deserves to be published.

Various people have used (a version of) Super Mario Bros. as a demonstration of planning AI recently. As a result, we see that people can write planning algorithms, based on imperfect information about the game state, that can complete a straightforward Mario level with some competence, but not up to the level of competence of, say, a typical '80s child.

Ascending in Nethack is an insanely difficult accomplishment that few people ever achieve. The game is much more complex than a Mario level, though perhaps the non-real-time aspect of it allows for more sophisticated planning.

Re: First NetHack bot ascension

#53
post #27
post #9

Earlier quoted context omitted.

Nethack is a very complex game, and takes a very long time to understand enough to ascend (beat the game). Think of it like dungeons and dragons on crack, with endless possibilities and variables. The fact that someone wrote a bot to think on its feet enough to do this, is astonishing. You should try it out in your free time, check out alt.org, there's a server where you can play and the irc channel #nethack on freen…

Probably D&D with a human dungeon master would allow more possible actions, in the sense that NetHack only allows (a)pply, (C)all, (d)rop, (e)at, (E)ngrave, (f)ire, (P)ut on, (q)uaff, (Q)uiver, (r)ead, (t)hrow, (w)ield, (W)ear, (z)ap, #dip, #invoke, #name, #offer, and #rub actions with specific items in your main inventory (and most of those actions won't be applicable to most items most of the time). A human DM migh…

Then again, human DMs can also be outwitted by careful specification of actions. Like how someone managed to win the original Tomb of Horrors.

Re: First NetHack bot ascension

#54

Folks, do yourself a favor, and check out the bot's source: https://github.com/krajj7/BotHack/blob/master/src/bothack/bo... It's really, really neat. Even to those of us who know little or nothing about the game, from the nested Englishy descriptors piled up into short conditions for things-the-bot-might-want-to-do, the basic strategies can be discerned...

I have no idea how to even parse this:

    (or (if (and (weak? player)
If it is a player or a weak player?

Or this probably simple function(?):

    (defn- want-protection? [game]
      (and ( 15 (:xplvl (:player game)))))
It makes zero intuitive sense to me.

Re: First NetHack bot ascension

#55
post #51
post #41

Earlier quoted context omitted.

> Absolutely cannot tell if you're fucking with me, or if this is an actual game mechanic Welcome to the world of nethack! The amount of special case situations that have been programmed into this game over the last few decades are truly amazing. (Mostly because it somehow still works.) I still remember the first time I ran into a kitchen sink.

NetHacks DevTeam are so famous for their special cases that the TVTropes article for obscure special cases was named after them. Here's the subarticle for NetHack examples: http://tvtropes.org/pmwiki/pmwiki.php/TheDevTeamThinksOfEver...

I lost it at this entry:

> Additionally, throwing a cockatrice corpse up (

Some of these I knew, most I did not. Thanks for sharing that.

Re: First NetHack bot ascension

#56

Earlier quoted context omitted.

... and then there's some things that probably only make sense if you're very familiar with Nethack: (def desired-shirt (ordered-set "T-shirt" "Hawaiian shirt"))

This one's actually not that hard to explain. Shirts can be worn under your armor, and these are the only two kinds of shirts. Normally, a shirt adds nothing to your armor class, but it can be enchanted (up to +7 safely), so it's nice to have one if you can find one. The problem with the Hawaiian shirt is that shop keepers will assume you're a tourist, and charge you extra.

* +5 safely. +7 is elven armor.

Re: First NetHack bot ascension

#57
post #54

Folks, do yourself a favor, and check out the bot's source: https://github.com/krajj7/BotHack/blob/master/src/bothack/bo... It's really, really neat. Even to those of us who know little or nothing about the game, from the nested Englishy descriptors piled up into short conditions for things-the-bot-might-want-to-do, the basic strategies can be discerned...

I have no idea how to even parse this: (or (if (and (weak? player) If it is a player or a weak player? Or this probably simple function(?): (defn- want-protection? [game] (and ( 15 (:xplvl (:player game))))) It makes zero intuitive sense to me.

LISP-style languages are a pain to read, but it's purely mechanical: everything's in "polish notation", (function arg1 arg2), even when function is something that we would want to think of as an operator or an accessor method. So in Scala I'd write that function as:

    def want-protection(game) =
      game.player.protection 

Re: First NetHack bot ascension

#58
post #54

Folks, do yourself a favor, and check out the bot's source: https://github.com/krajj7/BotHack/blob/master/src/bothack/bo... It's really, really neat. Even to those of us who know little or nothing about the game, from the nested Englishy descriptors piled up into short conditions for things-the-bot-might-want-to-do, the basic strategies can be discerned...

I have no idea how to even parse this: (or (if (and (weak? player) If it is a player or a weak player? Or this probably simple function(?): (defn- want-protection? [game] (and ( 15 (:xplvl (:player game))))) It makes zero intuitive sense to me.

[deleted]

Re: First NetHack bot ascension

#59
post #54

Folks, do yourself a favor, and check out the bot's source: https://github.com/krajj7/BotHack/blob/master/src/bothack/bo... It's really, really neat. Even to those of us who know little or nothing about the game, from the nested Englishy descriptors piled up into short conditions for things-the-bot-might-want-to-do, the basic strategies can be discerned...

I have no idea how to even parse this: (or (if (and (weak? player) If it is a player or a weak player? Or this probably simple function(?): (defn- want-protection? [game] (and ( 15 (:xplvl (:player game))))) It makes zero intuitive sense to me.

That first line is just the beginning of a statement that goes on until line 71. It decides whether to eat or pray if the player is very hungry. (In NetHack you can die of starvation if you don't have enough nutrition; nutrition can be obtained either by eating food[1], or in some circumstances by praying when hungry.)

The second function is easier for me to understand: it says that the player wants protection if the player has less than 3 intrinsic protection and has an experience level higher than 15. (In NetHack, gods grant intrinsic protection under some circumstances, which causes one to become better armored even without wearing additional physical armor. It's basically like a kind of magical armor on one's body that's independent of any physical object.) The idea seems to be that a player with at least experience level 15 ought to have 3 or more points of protection, and if the player doesn't, the player should try to go and get them.

If you're not used to reading parenthesized prefix notation, you might have a look at

https://en.wikipedia.org/wiki/Polish_notation

https://en.wikipedia.org/wiki/S-expression

https://en.wikipedia.org/wiki/Lisp_%28programming_language%2...

[1] In another example of NetHack's complexity, it's also possible in some circumstances to eat objects other than food, by turning into a monster that's able to eat the objects in question.

Re: First NetHack bot ascension

#60
post #48
post #29

One of the difficulties for a human playing Nethack is remembering all the potions and amulets and wands and scrolls and rings and monsters and their effects and many, many, many combinations. In a way a bot should have an easier time since it has basically unlimited memory.

True, also most player deaths are due to obvious mistakes - YASD (Yet Another Stupid Death), mistakes that the bot will only ever make once and then be programmed to avoid.

Yeah, I guess a major advantage for a bot is being totally disciplined and never impatient. "No, I won't read that yet; yes, I will #untrap three times; no, I won't go down these stairs with the cockatrice corpse; no, I won't eat this giant while satiated" and so on. It can be hard for human players to have absolute discipline about not doing actions that they know could theoretically cause instant death.

Also, the bot can safely walk along the edge of lava without falling in due to a typo. :-)

Post reply on HN