Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old June 16, 2013, 13:21   #1
quarague
Adept
 
Join Date: Jun 2012
Posts: 239
quarague is on a distinguished road
engine for rand art generation

I've been playing a char with rand arts, which is great fun, here are some comments/ suggestions on how these are generated. So my understanding of how the current generation works is as follows: take a list of all the possible properties, choose one at random, add it to the artifact, then decide whether the artifact is powerful enough as is, if not roll again for another property.
This leads to some properties that are very rare in standarts to be just as common as the common properties. As an example, my char found lots of artifacts that grant ESP, but it took until char level 36 at 3000'' until I found the first item that grants all 4 base resists.
This is not surprising if the artifact generation works as described, the chance to roll all 4 base resists is much lower than rolling ESP. If you want the rand arts to model the stand arts more closely, the easiest way would probably be to weight the list of properties. For example roll a d100, rolling a 1 to 5 gives fire resistance, rolling a 6 gives ESP, etc. Then getting fire res is 5 times a likely as getting ESP. One could also put the 4 base resists as a single property in the list. This would of course require lots of balancing and play testing.
quarague is offline   Reply With Quote
Old June 16, 2013, 13:29   #2
Philip
Knight
 
Join Date: Jul 2009
Location: Prague,Czech Republic
Posts: 737
Philip is on a distinguished road
A simple solution is to either group abilities together, or make getting an ability make getting other abilities associated with it more likely.
Philip is offline   Reply With Quote
Old June 16, 2013, 15:10   #3
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,054
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by Philip View Post
A simple solution is to either group abilities together, or make getting an ability make getting other abilities associated with it more likely.
Umm ... yeah. The randart generator isn't perfect, but it is a *teeny* bit more sophisticated than the OP thinks.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old June 16, 2013, 15:24   #4
Philip
Knight
 
Join Date: Jul 2009
Location: Prague,Czech Republic
Posts: 737
Philip is on a distinguished road
The fact that randarts are not only playable, but played is quite the testament to that. I have to congratulate the V team there. Randarts were very quickly brought to a level where I preferred playing with them.
Philip is offline   Reply With Quote
Old June 16, 2013, 15:46   #5
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 7,943
Derakon is on a distinguished road
Among other things, you should notice that:

* Resistances are more common on body armors and shields
* Boots are a lot more likely to have sizable speed boosts
* Weapons tend to focus on slays
* Extra shots/blows almost never show up on non-bows/weapons
Derakon is offline   Reply With Quote
Old June 16, 2013, 17:56   #6
quarague
Adept
 
Join Date: Jun 2012
Posts: 239
quarague is on a distinguished road
Quote:
Originally Posted by Magnate View Post
The randart generator is a *teeny* bit more sophisticated than the OP thinks.
Glad to hear, could you elaborate, what does it do to make the randarts?
quarague is offline   Reply With Quote
Old June 17, 2013, 09:06   #7
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,054
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by quarague View Post
Glad to hear, could you elaborate, what does it do to make the randarts?
I know the forum's search function isn't very good, but I think I have probably posted this explanation five or six times over the years. I do hope you've spent at least a couple of minutes having a look, as the previous explanations were more comprehensive than this one.

First, the randart code analyses lib/edit/artifact.txt and records precisely how often each ability (resist, slay, brand, stat boost, whatever) occurs on each type of item (weapon, shield, body armour, cloak etc.).

Then if certain abilities are below certain minima, the frequencies are increased. This is to ensure that abilities can be generated on randarts even if they aren't present in the standart set.

Then each artifact is taken in turn and randomised according to its total power level. First, a new base item is chosen, which must be not too powerful and not too weak (lest it have too many or too few abilities). Then random abilities are added one at a time (which can depend on item type, previous abilities etc. but are mainly guided by the frequencies recorded earlier). If the result is less than 95% of target power, we carry on adding more. If we're over 105%, we roll back the last addition and try again. If we run out of tries we scrap the whole randart and start again.

Once we've randomised them all we check that we have minimum amounts of each item type. If we don't, we scrap the whole set and start again.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old June 17, 2013, 15:03   #8
DaviddesJ
Swordsman
 
Join Date: Mar 2008
Location: Burlingame CA
Age: 54
Posts: 254
DaviddesJ is on a distinguished road
This is something I might be able to work on and contribute to the codebase (which I have never done in the past). I have a lot of professional experience in global optimization and sampling. The "add one at a time, check for appropriate strength" method can introduce biases between less and more valuable abilities (i.e., given the method as described, the probability that an artifact has a given ability might not end up very close to the original target probability). There are other more "global" methods of sampling which could generate artifacts with a better match to the desired target distribution of abilities.

I might take a look at this later this summer.
DaviddesJ is offline   Reply With Quote
Old June 17, 2013, 15:37   #9
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,054
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by DaviddesJ View Post
This is something I might be able to work on and contribute to the codebase (which I have never done in the past). I have a lot of professional experience in global optimization and sampling. The "add one at a time, check for appropriate strength" method can introduce biases between less and more valuable abilities (i.e., given the method as described, the probability that an artifact has a given ability might not end up very close to the original target probability). There are other more "global" methods of sampling which could generate artifacts with a better match to the desired target distribution of abilities.

I might take a look at this later this summer.
I'm happy to abdicate maintainership of this code; I've been focused on Pyrel for the last year or more. I do plan to write a new randart generator for Pyrel, so would be happy to learn from any improvements you make to this one.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old June 17, 2013, 16:45   #10
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,302
AnonymousHero is on a distinguished road
Quote:
Originally Posted by DaviddesJ View Post
There are other more "global" methods of sampling which could generate artifacts with a better match to the desired target distribution of abilities.
Out of interest, what are those methods? (Wiki or article links would be much appreciated.)
AnonymousHero is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Game Master's Campaign - Fantasy art kit Shockbolt Idle chatter 34 November 6, 2012 15:17
3.3 artifact generation bulian Vanilla 13 October 12, 2011 17:34
T-Engine 4 & ToME4 beta 2 are upon us! DarkGod ToME 15 May 27, 2010 19:06
Object generation in 3.1.2 PowerWyrm Vanilla 4 May 7, 2010 22:08
[Hell] Help needed for ASCII art konijn_ Variants 1 July 29, 2007 17:06


All times are GMT +1. The time now is 04:27.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.