Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   Procedurally Generated Unique Monsters (http://angband.oook.cz/forum/showthread.php?t=5271)

Riff January 30, 2012 16:34

Procedurally Generated Unique Monsters
 
Hi guys! I'm doing a thesis on procedural content generation, and for that, I'm looking at ways to generate unique monsters in Angband that are meant to be enjoyable in a challenging sort of way.

To this end, I need help from you: the Angband community. See, I'm hugely into game design and development in general, but as far as roguelikes go, I've never dedicated myself to one game long enough to conquer it. In the past, I've spent some time with Nethack and DCSS. In fact, I've only just started playing Angband for this project. So it'd be great if I could get input from you as my work progresses!

It's also necessary that I get some feedback once I finish setting up my 'experiments' so I can evaluate their value; after all, the aim is to generate content that maximises your enjoyment.

The First Phase - Test Dungeon
If I were to use the game as it is and just substitute the unique monsters with my own, evaluation would take a pretty long while (though I've heard experienced players could finish in a day?) Plus, main reason for using Angband is because it already has a Borg I can use to theoretically evaluate my random unique monsters, and a shorter dungeon would help with simulation times.

My initial idea is to create a test dungeon that comprises a few deeper levels. And to ensure that the unique monsters are actually encountered, a forced quest on each level to beat them before the staircase down appears - this is similar to a boss fight in a sense.

So far, I've figured out how to start the game at a deeper level and grant bonus exp at the start to get the character level high enough. I'll be looking at how to replicate the forced quest from Sauron's level next.

These are some questions I pose for you:
  1. How many levels do you think would be sufficient to get a feel for the game? 5? 10?
  2. Which depths would be most appropriate for this? Somewhere in the middle or near the end, I would guess?
  3. At what level should the character start off? Same as the depth level?
  4. What inventory should the character start off with?
  5. Should the town be available?
  6. Alternatively, rather than worry about the above questions, should I do something similar to some variants and simply 'compress' the dungeon to a shorter version?

Magnate January 30, 2012 16:50

Sounds very interesting, but why do you need fewer levels? Why not just make one unique for each level and set the QUESTOR flag for each of them? That would be the most thorough test of your generation algorithm, because it would use the full range of monster power (depth == monster_level). Using the borg to see how far he gets is an excellent idea.

I'm interested because of the similarities with randarts; the devteam members previously keen on random uniques are d_m and fizzix IIRC.

Good luck with the project.

Riff January 30, 2012 17:28

Well the reason for shorter levels is twofold:
  1. Shorter times for simulation. I haven't tested how fast the borg can complete a game, so I'm not sure how important this is. Since I'll be using simulations to evaluate each set of random uniques and that set will keep evolving with each simulation, it's best if I can run more simulations in a shorter amount of time.
  2. Shorter times for human evaluation. I figured that if I made a shorter version, I'd get feedback a lot quicker and more people would be willing to give it a go, and thus, I can get more feedback to validate my findings.

Derakon January 30, 2012 17:29

If you want to leverage the borg, you should probably step back a few versions. At the very least I don't think the borg's running in 3.3 yet.

The game already has monster power calculations so it can determine how valuable e.g. Slay Troll or Firebrand attributes on weapons are. It should be relatively straightforward to generate random monsters with a target "threat level".

We've discussed randomly-generated monsters in the past; if I recall correctly the big concern with implementing them was that Angband is at some level a trial-and-error game where you can make a fatal mistake because you didn't realize that the monster you were fighting had some specific ability. For example, not realizing that drolems can breathe poison (their description makes no reference to poison) or that poison's damage cap is 800HP (which isn't mentioned anywhere in-game). You can see how this could create issues when there are monsters that are different every time you play the game. Then we segued into whether or not the player should get automatic knowledge of monster capabilities and I think the discussion died off there.

As for the parameters for your experiment, I'd recommend just picking a few character dumps from the ladder and constructing a composite character based on them. Games vary heavily depending on class and gear found -- for example, while warriors can manage to keep their clvl roughly matching dlvl up to around dungeon level 20 or a bit further, most everyone else will have slowed down their dive before that point. But if you find Boots of Speed then you can dive far more aggressively.

Ultimately what I think would probably work best is a pre-set character at a pre-set dungeon depth. You start the game, get your character, a new level is created, and you seek out and fight the unique monster on the level. Constrain as many variables as you can. I'm doubtful the borg will be especially helpful for this, sadly, since its playstyle looks nothing like that of your average human.

Anyway, good luck!

Riff January 30, 2012 18:08

Quote:

Originally Posted by Derakon (Post 66483)
We've discussed randomly-generated monsters in the past; if I recall correctly the big concern with implementing them was that Angband is at some level a trial-and-error game where you can make a fatal mistake because you didn't realize that the monster you were fighting had some specific ability.

But shouldn't players be cautious of unique monsters in general though? Another further extension I'll be looking at (if I have the time) would be to automatically generate the descriptions as well. I think that would be a good way to at least hint at what the unique monster is capable of.

It's worth mentioning that I'm looking at this experiment from the perspective of whether it's possible to automatically generate unique monsters as good as, or better than the default ones, which were manually crafted. The speed of the generation process will ultimately determine whether it'd be suitable to be implemented in-game. Otherwise, it still offers a glimpse at what a tool for assisting monster design could look like.

Quote:

Originally Posted by Derakon (Post 66483)
As for the parameters for your experiment, I'd recommend just picking a few character dumps from the ladder and constructing a composite character based on them.

That's a great idea! Thanks!

Quote:

Originally Posted by Derakon (Post 66483)
I'm doubtful the borg will be especially helpful for this, sadly, since its playstyle looks nothing like that of your average human.

Yeah, I've heard about that as well... Originally I was looking into coding my own bot/borg, but looking at Angband's codebase, I'm not sure how easy it would be, considering I'd want the bot to be able to look ahead and simulate different sequences of actions before deciding what to do.

The borg is better than nothing then for now, since I need a large number of simulations.

Edit:
I believe the version I have at the moment is 3.4 according to the changes file - forked the latest from github. It's already set up to compile with the borg and it seems to work properly but...from the few runs I've done, it's doing poorly(dying at the first dungeon level once, and from starvation in the town a couple of times).

I'm guessing the borg can run but can't handle the changes in 3.4? What's the latest version of Angband it can beat then? 3.2?

buzzkill January 30, 2012 21:40

Z+ has random uniques. Might want to look at that.

In-depth uniques aren't always be killable. A big part of Angband is knowing when to run, and a unique even when found at it's proper depth by a well equipped character could well prove too much to handle depending on the specifics.

and what Derakon said. You typically need superior intelligence to beat in-depth uniques. The borg probably won't do you much good.

Maybe, just maybe, try creating random-unique vs. random-unique combat. If equally powerful random uniques can square off against each other without it turning into a consistently one sided romp, then you've probably achieved balance within the generation process. Then it's just a matter of pairing that level of generation against an effective approximate character level.

Magnate January 31, 2012 11:45

Quote:

Originally Posted by Riff (Post 66484)
I believe the version I have at the moment is 3.4 according to the changes file - forked the latest from github. It's already set up to compile with the borg and it seems to work properly but...from the few runs I've done, it's doing poorly(dying at the first dungeon level once, and from starvation in the town a couple of times).

I'm guessing the borg can run but can't handle the changes in 3.4? What's the latest version of Angband it can beat then? 3.2?

Yes, 3.2.0 is the last official borg release from APW. Noz has ported it to 3.4, but there were a lot of fundamental code changes so some of the functions the borg uses to understand the game are no longer effective, hence its poorer play.

Part of the problem is that (IIUC) APW wanted the borg code to be completely independent of the game, which is an admirable goal but means that it replicates a lot of the game logic. When this changes, the changes have to be replicated in the borg code. For example, the borg calculates its own blows, it does not use the game's calc_blows function. And so on for a very large number of functions.

IMO it would be a lot easier to maintain the borg if it called more of the game's own functions and only had the AI code separate - but I don't know APW's views on this. It might make it more difficult to port the borg to variants - but now we have AngbandBase it might not.

getter77 January 31, 2012 12:49

I can, very unfortunately, no longer get this game to run on my Win 7 PC as the dev thinks there might've been some Windows update that broke something and he's yet to figure out what on top of being totally slammed with life and his 3rd game project.

Still, this is a Roguelike completely centered on the notion in this topic, so I'd imagine there has to be some good cues that could be gleamed from it: Random Realms

http://forum.thegamecreators.com/?m=...w&t=178942&b=5

buzzkill January 31, 2012 16:44

Quote:

Originally Posted by getter77 (Post 66495)

I'll have to add this to my list of thing to try, after Sil. Sounds interesting and looks to have a very nice UI too.

Riff January 31, 2012 21:16

Quote:

Originally Posted by buzzkill (Post 66486)
Z+ has random uniques. Might want to look at that.

I had a look at the source for that. The idea is similar to Champions in the Diablo series, where they take a base monster and apply random upgrades. I was thinking along the same lines, though using the more generic monster templates in Angband rather than specific individual monsters. But the templates only exist in 3.4 and not 3.2, where the borg works best...

Quote:

Originally Posted by getter77 (Post 66495)

That looks interesting. Might try contact him to see if he's willing to share the source code, or at least explain the monster generation algorithm...


I toyed around with the 320 borg. Now I'm not sure whether it's viable to use for my simulations. Occasionally, it just stands around doing nothing or paces back and forth repeatedly. I notice this happens when its path is blocked by rubble (doesn't seem to want to tunnel through it), or when there's no path left to explore (I thought it should skirt the walls searching for secret doors or something).

Very tempted to write my own borg. Any advice for going down that route? I already have ideas for what algorithms to use, but it'll take some time for me to get to grips with the codebase to figure out which parts I can use. For example, can I assume that I can get hints from the save/load functionality in order to be able to save/load game states for the borg's own simulations of possible move sequences?


All times are GMT +1. The time now is 06:14.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.