Sign in with
Sign up | Sign in
Your question

Roguelike AIs

Last response: in Video Games
Share
Anonymous
June 27, 2005 3:03:16 PM

Archived from groups: rec.games.roguelike.development (More info?)

The secondary focus of the roguelike I am currently working on is an
interesting and varied NPC (inc. monsters) AI. After surviving CS221,
I've got some pretty ambitious plans for AI in my game. Some of the
ideas I'm tossing around are using genetic algorithms to train monster
fitness (to some extent my game will be half roguelike, half AI sim).
This usually takes a while so I though perhaps I would program my game
to run as a screen saver, training AIs for particular populations of
monsters on particular levels, then saving the results for the next
time the user wants to play a game. The second idea I was kicking
around was to implement or steal a full blown planner (as described in
Russel & Norvig) to let high level NPCs reason about different
situations. I'm not sure either of these approaches would give good
results, but they are interesting to think about.

At still at the point where I'm looking at what others have done for
{inspiration, guidence}, so if anyone could point out a couple of
roguelikes that are known to have particularly good/interesting AIs,
that would be awesome. A description of the richest AI experience
you've had playing any roguelike would be nice as well (this would be
an instance where the AI struck you as being particularly clever).

Regards

More about : roguelike ais

Anonymous
June 27, 2005 4:59:11 PM

Archived from groups: rec.games.roguelike.development (More info?)

Telamon wrote:
> At still at the point where I'm looking at what others have done for
> {inspiration, guidence}, so if anyone could point out a couple of
> roguelikes that are known to have particularly good/interesting AIs,
> that would be awesome. A description of the richest AI experience
> you've had playing any roguelike would be nice as well (this would be
> an instance where the AI struck you as being particularly clever).

My favorite AI is in Thief. It's not a rogue-like, but the behavior
could
surely be implemented in one.

For those not familiar, Thief is a sneaking game, where you go around
trying to take things. Most of the time you want to avoid any form of
combat or encounters, because your character is generally weak.

In the game, normal citizens will run when attacked, and call for help.
Guards, if they are close enough, will respond to the calls for help,
and even call more guards. If a body is found by someone, they will
call
for help, or if they are a guard, will go looking for you. It's a fun
game, and feels "mostly" realistic. Enough to be an enjoyable play.

If a guard is out matched, they'll even run away to get more guards and
bring more back. If they see something "out of place" the will even
start
looking around. And it doesn't feel like the NPC's "cheat" at all -
they
seem to not know where you are, and actually appear to be searching.

I'd say allowing NPC communication would provide a much more
interesting
situation then going for a simulated GA, or anything like that. The
"awareness" of an NPC seeing a body, and running for help, makes things
seem much more intelligent.

I'm not sure if other games have implemented this sort of behavior.
The
Tom Clancy's Ghost Recon games, and others like it, offer a CLOSE
experience,
but it has a much more hard-coded feel (IMHO). Thief is really the
game to
try to see how they got it "right".
Anonymous
June 27, 2005 10:25:38 PM

Archived from groups: rec.games.roguelike.development (More info?)

At 27 Jun 2005 11:03:16 -0700,
Telamon wrote:

> The secondary focus of the roguelike I am currently working on is an
> interesting and varied NPC (inc. monsters) AI. After surviving CS221,
> I've got some pretty ambitious plans for AI in my game.

You have to remember to set the clear rules *before* you start with the AI.
Note also that you probably don't want the monster/monsters be a side in
the game -- they should rather be part of the game's rules.

It's easy to come up with 'perfect' winning strategy for the monsters in
roguelike game. For example, there was that idea of just escaping down,
grabbing all the food and items along the way, to hide behinfd the backs
of the strongest monsters at the last level, and attack the player
character all at once.

You don't want the monsters to play your game. You want them to behave
naturally, that is, the way you'd expect this particular kind of monster
to behave. They'll also probably have different goals, and only few of
them would be to desperately stop/kill the player character.

> Some of the
> ideas I'm tossing around are using genetic algorithms to train monster
> fitness (to some extent my game will be half roguelike, half AI sim).
> This usually takes a while so I though perhaps I would program my game
> to run as a screen saver, training AIs for particular populations of
> monsters on particular levels, then saving the results for the next
> time the user wants to play a game.

You want to train the monsters against the player and his tactics, not
against each other. Otherwise you could just run the training on your
computer for, say, a weak, then just save the tables and use them as
static data in your game.

The problem with training monsters against the player has it's own
problems. First, you've got way too few data to do any full-blown
genetic search -- maybe it'd be less an issue on multiuser systems.
Second, it's hard to come up with good fitness function. Remeber, you want
the monsters to behave 'cool' and fitting to their role, not necessarily
'optimal' for the game's rules.

> The second idea I was kicking
> around was to implement or steal a full blown planner (as described in
> Russel & Norvig) to let high level NPCs reason about different
> situations. I'm not sure either of these approaches would give good
> results, but they are interesting to think about.

It's surely lots of fun to play with monster AI, even when it doesn't
produce a fun game.

> At still at the point where I'm looking at what others have done for
> {inspiration, guidence}, so if anyone could point out a couple of
> roguelikes that are known to have particularly good/interesting AIs,
> that would be awesome. A description of the richest AI experience
> you've had playing any roguelike would be nice as well (this would be
> an instance where the AI struck you as being particularly clever).

Hajo's H-World has it's need-driven AI;
There's 10drl called Scrap that focuses on perception, IIRC;
Some Angband variants have a separate AI for monster packs, which might be
intersting (altrought I've heard a lot of complaining).
There are some 'behavioral' AIs out there too.
I'm sure the authors have much moreto say about them. My zombies only
go in the direction of the nearest brai^H^H^H^Hhuman around -- not
particulary smart, but what you expect from zombies?

--
Radomir `The Sheep' Dopieralski @**@_
(*+) 3 Sparkle
. . . ..v.vVvVVvVvv.v.. .
Related resources
Anonymous
June 28, 2005 10:05:23 AM

Archived from groups: rec.games.roguelike.development (More info?)

Arakon wrote:

> I'm not sure if other games have implemented this sort of behavior.

Metal Gear Solid 2 & 3 both have something similar. The guards can
notice sounds, movements (if you get into their field of view for just a
split second), footprints on the floor and other guards that are
sleeping, knocked out or dead. If you caused an alarm, you have to get
out of their sight for a while to make them cancel it. They will search
the last position they saw you at with a special team, that will check
any obvious hiding spots, like below tables and the like. If they don't
find you, they will go back to their patrols, but stay extra cautious.
If you don't get seen for a bit more, they will go completely back to
normal. You can knock on walls to make noises, throw empty magazines for
the same effect at a distance, use "books" (magazines with nice pictures
;)  and a few other things to distract them. In part 3 you can also blow
up food depots, so the guards in the area all are hungry, which makes it
possible to use food to distract them (and poison them, if you are
mean). And you can capture animals which you can then throw at guards,
again to distract them or in the case of venomous animals, to kill them.

I hope this makes a bit sense, as I am way too tired to really think
straight.
Anonymous
June 28, 2005 10:38:09 AM

Archived from groups: rec.games.roguelike.development (More info?)

> YABDR.

Unlike you I already have a binary. Nice site btw.
Anonymous
June 28, 2005 1:31:38 PM

Archived from groups: rec.games.roguelike.development (More info?)

Telamon wrote:
> The secondary focus of the roguelike I am currently working on is an
> interesting and varied NPC (inc. monsters) AI. After surviving CS221,
> I've got some pretty ambitious plans for AI in my game. Some of the
> ideas I'm tossing around are using genetic algorithms to train monster
> fitness (to some extent my game will be half roguelike, half AI sim).
> This usually takes a while so I though perhaps I would program my game
> to run as a screen saver, training AIs for particular populations of
> monsters on particular levels, then saving the results for the next
> time the user wants to play a game. The second idea I was kicking
> around was to implement or steal a full blown planner (as described in
> Russel & Norvig) to let high level NPCs reason about different
> situations. I'm not sure either of these approaches would give good
> results, but they are interesting to think about.

YABDR.

> At still at the point where I'm looking at what others have done for
> {inspiration, guidence}, so if anyone could point out a couple of
> roguelikes that are known to have particularly good/interesting AIs,
> that would be awesome. A description of the richest AI experience
> you've had playing any roguelike would be nice as well (this would be
> an instance where the AI struck you as being particularly clever).

The experience is simple -- all those fancy AI algorithms are useless
when faced against reality -- there's always a much simpler
"brute-force" algorithm that mimicks the same results and is a lot faster.

--
At your service,
Kornel Kisielewicz (charonATmagma-net.pl) [http://chaos.magma-net.pl]
"The development cycle for roguelikes never ends..." -- Joseph
Hewitt
Anonymous
June 29, 2005 11:06:40 AM

Archived from groups: rec.games.roguelike.development (More info?)

> The idea of researching AI in RL is an interesting idea, but its
> interesting for AI more than for RL. RL is good for AI because it is
> a very abstracted environment (very much a "toy" or model problem) but
> none-the-less manages to have rich contents and consequences (no
> "everything in the world is a unit cube and their only properties are
> "colour" and "is above" type limitations).

That's very true. Have you ever experimented with the Angband Borg?
It's very cool.

> AI might not be good for RL because improved AI is not necessarily
> good for games. There are all sort of issues (some of which other
> posters have already covered) with fitting better AI into a game.

Also a good point. It's unclear that any of the improvements that I was
talking about would lead to a more interesting game. However, I think
that a lot of people would agree that it would be cool to have some
level of improvement in the AI-ness of some of the more intelligent
creatures in RLs (at least in the ones I've played). How this would be
manifest is unclear, though interagent communication could be a good
start. The ultimate goal would not really be to make the game harder
(one can always pump stats to do that), but to make encounters more
varied.

> Most telling is the issue of "visibility". e.g. any improved AI
> technique has to be somehow made visible to the player, or else it is
> wasted.

Well, yes. Mostly I agree. Though if the player *knows* that the NPC
movements are random it's hard to invent a story for what is going on.
I guess the difference is the level of randomness one is using. If the
two NPCs are randomly wandering around in a bar oblivious to each other
that lends itself to the imagining of a narrative much less than if
they are drinking together, then randomly decide to depart together.
Still, your point about not wasting time implementing invisible
improvements (look! my kobolds check to see if their shoes are tied
before running!) is well taken.

Regards
Anonymous
June 29, 2005 2:42:57 PM

Archived from groups: rec.games.roguelike.development (More info?)

I don't know if you've seen this link already or not, but it is an
evolving neuro-network technique made into a game:
http://nn.cs.utexas.edu/NERO/index.php

It's based on NEAT (NeuroEvolution of Augmenting Topologies), which you
can get source libraries and more info at:
http://www.cs.utexas.edu/users/kstanley/neat.html

>From what I can tell, most of these are available as LGPL, and there's
a C# one as well.

I don't know how well suited this would be for a roguelike. A lot
would depend on the inputs of course. Preparsing things can help, and
maybe segmenting the network's specialties (one for picking item, one
for deciding if using an item, etc?) . It'd be an interesting
experiment. I know nn's can be picky about how the data inputs is
normalized to get good results.

As others have said though, I don't think it would be fun for gameplay,
but surely fun as a toy. Definitly an appealing idea, even if it
doesn't come to fruitation.
Anonymous
June 29, 2005 4:38:40 PM

Archived from groups: rec.games.roguelike.development (More info?)

On 27 Jun 2005 11:03:16 -0700, "Telamon" <shedletsky@stanford.edu>
wrote:

>The secondary focus of the roguelike I am currently working on is an
>interesting and varied NPC (inc. monsters) AI. After surviving CS221,
>I've got some pretty ambitious plans for AI in my game. Some of the
>ideas I'm tossing around are using genetic algorithms to train monster
>fitness (to some extent my game will be half roguelike, half AI sim).
>This usually takes a while so I though perhaps I would program my game
>to run as a screen saver, training AIs for particular populations of
>monsters on particular levels, then saving the results for the next
>time the user wants to play a game. The second idea I was kicking
>around was to implement or steal a full blown planner (as described in
>Russel & Norvig) to let high level NPCs reason about different
>situations. I'm not sure either of these approaches would give good
>results, but they are interesting to think about.
>
>At still at the point where I'm looking at what others have done for
>{inspiration, guidence}, so if anyone could point out a couple of
>roguelikes that are known to have particularly good/interesting AIs,
>that would be awesome. A description of the richest AI experience
>you've had playing any roguelike would be nice as well (this would be
>an instance where the AI struck you as being particularly clever).
>

The idea of researching AI in RL is an interesting idea, but its
interesting for AI more than for RL. RL is good for AI because it is
a very abstracted environment (very much a "toy" or model problem) but
none-the-less manages to have rich contents and consequences (no
"everything in the world is a unit cube and their only properties are
"colour" and "is above" type limitations).

AI might not be good for RL because improved AI is not necessarily
good for games. There are all sort of issues (some of which other
posters have already covered) with fitting better AI into a game.

Most telling is the issue of "visibility". e.g. any improved AI
technique has to be somehow made visible to the player, or else it is
wasted. In RL this might mean giving the player some ability (and
need) to watch the AI in action and either influence it or profit from
the information gained. e.g. if the improved AI was on NPCs, then if
the player could overhear the NPCs in a bar, maybe the NPCs would be
plannign a robbery, then the player could (i) lie to them, or (ii)
grass them up, or (iii) try to joing the gang, or (iv) lie in wait for
them. As long as the AIs response to the players intervention (and
its own plans!) all make sense, and can be seen by the player (e.g. if
the gang's response imakes sense, but involves them leaving town and
never being seen again, that's losing the visibility) then you are
getting a benefit from the improved AI

If you ain't got visibility, then then NPCs might as well be random...

Ian


Ian Badcoe (triangleigbgeneralaccount@yahoo.square.co.uk)
(remove two shapes from this address to contact me)
(do not use the reply address...it's full of spam)

In fifteen minutes, everybody will be in the future.
Anonymous
June 29, 2005 4:38:41 PM

Archived from groups: rec.games.roguelike.development (More info?)

"Telamon" <shedletsky@stanford.edu> writes:

> I guess the difference is the level of randomness one is using. If the
> two NPCs are randomly wandering around in a bar oblivious to each other
> that lends itself to the imagining of a narrative much less than if
> they are drinking together

That depends on how much they've been drinking. :-)

sherm--

--
Due to the amount of unreadable gibberish being posted from Google Groups,
I seldom read messages posted from there.

Cocoa/Perl: http://camelbones.sf.net Hire Me: http://www.dot-app.org
Anonymous
June 29, 2005 5:45:18 PM

Archived from groups: rec.games.roguelike.development (More info?)

Telamon wrote:
>>YABDR.
> Unlike you I already have a binary.

ROTFL! Well, I think that your argument is as valid as snow on the
sahara ;-)
--
At your service,
Kornel Kisielewicz (charonATmagma-net.pl) [http://chaos.magma-net.pl]
"Come on, Kornel. 11 years and no binary? And it's not
vapourware?" -- Mike Blackney
Anonymous
June 30, 2005 3:42:54 PM

Archived from groups: rec.games.roguelike.development (More info?)

Telamon wrote:
>>YABDR.
>
> Unlike you I already have a binary. Nice site btw.

Okay, as nobody here seemed to mention it : I may not have a binary
to *show* of GenRogue, but I created DoomRL - which is a *complete*
roguelike game. Also I created DiabloRL, a 7DRL. So believe me,
I know what I'm talking about.
--
At your service,
Kornel Kisielewicz (charonATmagma-net.pl) [http://chaos.magma-net.pl]
"It's much easier to make an army of dumb good people than to
make one single smart good guy..." -- DarkGod
!