Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old October 28, 2009, 18:53   #1
juggle5
Scout
 
Join Date: Feb 2009
Posts: 30
juggle5 is on a distinguished road
Gripes -- equipment optimizing program

What equipment should I wear? This is a common question, and a while ago there was interest in making a program to help out with this.

So, fph and I have been developing Gripes (Generic Roguelike Integer Programming Equipment Selector), and we have a first release available for download: http://sourceforge.net/projects/gripes/

Gripes is a command-line tool that reads a chardump and reports the optimal set of equipment to wear, and it shows how its recommendation compares to your current equipment set. You can configure what "optimal" means by changing the importance of different resists/bonuses, and you can force certain items to be worn (e.g., if you have a cursed item that you can't take off). While Gripes is especially useful for novice and intermediate players with a complex set of equipment, it may also be fun for veteran players to see how well a computer program stands up to their expert choices!

Gripes currently works with Angband 3.x and PosBand 0.9.9a, but it may work with chardumps from other variants, too. It is written in perl, so it's cross-platform (we've tested it on Mac OS X and Linux).

Please try it out and let us know what you think! Comments, suggestions, and bug reports are welcome, and if you're an expert player and you don't agree with the recommendations of Gripes, tell us why so we can improve it.
juggle5 is offline   Reply With Quote
Old October 28, 2009, 22:21   #2
pav
Administrator
 
pav's Avatar
 
Join Date: Apr 2007
Location: Prague, Czech republic
Age: 38
Posts: 777
pav is on a distinguished road
Send a message via ICQ to pav
This is very cool! (You might want to tell people that it needs glpk to run.)
__________________
See the elves and everything! http://angband.oook.cz
pav is offline   Reply With Quote
Old October 29, 2009, 00:45   #3
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 53
Posts: 7,188
Donated: $60
Nick is on a distinguished road
Nice. I ran it on my abortive attempt at the last V comp, and it told me I'd be better without the cursed ring of Searching...

I may have a go at adapting to FA at some point - I'm not sure if percentage resists will make it easier or harder.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old October 29, 2009, 03:03   #4
jevansau
Adept
 
Join Date: Jan 2009
Age: 59
Posts: 155
jevansau is on a distinguished road
It looks neat. Unfortunately when I try to use it on Windows 7 (with either recommended perl program installed) I get the error:
c:\gms\gripes>perl gripes.pl ..\angband-r1622\lib\user\Celoth.txt
List form of pipe open not implemented at gripes.pl line 1416, <CHARDUMP> chunk 1.
I did install glpk but not sure if I did so successfully.

Regards,
Jonathan
jevansau is offline   Reply With Quote
Old October 29, 2009, 03:51   #5
juggle5
Scout
 
Join Date: Feb 2009
Posts: 30
juggle5 is on a distinguished road
To pav: yes, it does require glpk (or some lp solver that can read gmpl/ampl files). Thanks for pointing this out.

Quote:
Nice. I ran it on my abortive attempt at the last V comp, and it told me I'd be better without the cursed ring of Searching...
To Nick: It appears gripes is working for you. If you edit your character dump so that your ring of searching is inscribed as {G:Wear} then gripes will force this to be worn in its solution.

Quote:
I may have a go at adapting to FA at some point - I'm not sure if percentage resists will make it easier or harder.
It should be possible to adapt gripes for other variants without too much work. The config files and the optimization problem are super-flexible. The hardest part is parsing character dumps for different variants correctly, especially if an attribute is treated differently between variants.

If I have time this weekend, I might try running a FA dump through gripes to see how different it is. If you get it working with FAngband (which would be great!) let us know and we can put your changes back in the main version.
juggle5 is offline   Reply With Quote
Old October 29, 2009, 04:08   #6
juggle5
Scout
 
Join Date: Feb 2009
Posts: 30
juggle5 is on a distinguished road
jevansau: Sorry it's not working for you yet. Neither fph or I have windows machines, so we weren't able to test it there. Thanks for being the guinea pig. To pin down where the problem is, try running gripes to just create the model, and then run the model separately through glpsol. So first:
Code:
perl gripes.pl -write-gmpl yourcharname.gmpl yourchardump.txt
If this works, then do
Code:
glpsol -m ./problem_model.gmpl -d yourcharname.gmpl
Let me know the results.

If you want, you can send me your char dump (or point to where it is on the ladder, if it's there) and I can tell you what the results should look like, and see if it's a windows-specific problem or a general gripes problem.
juggle5 is offline   Reply With Quote
Old October 29, 2009, 05:54   #7
fph
Knight
 
Join Date: Apr 2009
Location: Berlin / Italy
Posts: 631
fph is on a distinguished road
Quote:
Originally Posted by jevansau View Post
It looks neat. Unfortunately when I try to use it on Windows 7 (with either recommended perl program installed) I get the error:
c:\gms\gripes>perl gripes.pl ..\angband-r1622\lib\user\Celoth.txt
List form of pipe open not implemented at gripes.pl line 1416, <CHARDUMP> chunk 1.
If I interpret the error message correctly, that's because of a missing feature in the Windows Perl implementation.
Try replacing line 1416
Code:
    open GLPSOL, "-|", $glpsol_path, '-m', $model, '-d', $tmpfile or die "Could not execute command: $glpsol_path -m $model -d $tmpfile\nDo you have glpsol installed (and the right PATH set)?"; #this should be the safest "pipe open" variant
with this one
Code:
    open GLPSOL, "| $glpsol_path -m $model -d $tmpfile" or die "Could not execute command: $glpsol_path -m $model -d $tmpfile\nDo you have glpsol installed (and the right PATH set)?"; #this should be the safest "pipe open" variant
If this works, I'll change it in the upstream version
fph is offline   Reply With Quote
Old October 29, 2009, 05:56   #8
fph
Knight
 
Join Date: Apr 2009
Location: Berlin / Italy
Posts: 631
fph is on a distinguished road
Quote:
Originally Posted by pav View Post
(You might want to tell people that it needs glpk to run.)
Yep, that's true. But glpk is free software and should install painlessly on any platform (on my ubuntu it's just a matter of "aptitude install glpk-utils").
fph is offline   Reply With Quote
Old October 29, 2009, 07:40   #9
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 53
Posts: 7,188
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by juggle5 View Post
To Nick: It appears gripes is working for you. If you edit your character dump so that your ring of searching is inscribed as {G:Wear} then gripes will force this to be worn in its solution.
Cool.

Quote:
If I have time this weekend, I might try running a FA dump through gripes to see how different it is. If you get it working with FAngband (which would be great!) let us know and we can put your changes back in the main version.
I'm unlikely to do it any time soon - I'll probably give you about a 3 month head start...
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old October 29, 2009, 10:25   #10
andrewdoull
Unangband maintainer
 
andrewdoull's Avatar
 
Join Date: Apr 2007
Location: Sydney, Australia
Age: 43
Posts: 872
andrewdoull is on a distinguished road
Quote:
Originally Posted by juggle5 View Post
To pav: yes, it does require glpk (or some lp solver that can read gmpl/ampl files). Thanks for pointing this out.

It should be possible to adapt gripes for other variants without too much work. The config files and the optimization problem are super-flexible. The hardest part is parsing character dumps for different variants correctly, especially if an attribute is treated differently between variants.
Is it possible to have an online version available? I'm thinking of a web-based form where you could upload character dumps to, and it makes recommendations to your equipment layout? You could then also display the dumps, and create some kind of community for Angband players, with forums and everything?

Andrew
__________________
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
In UnAngband, the level dives you.
ASCII Dreams: http://roguelikedeveloper.blogspot.com
Unangband: http://unangband.blogspot.com
andrewdoull 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
Equipment Optimizer juggle5 Vanilla 1 September 13, 2009 15:07
Help with endgame equipment bebo Vanilla 6 May 3, 2009 18:23
Starting Equipment bobthegreat Vanilla 13 April 22, 2009 23:45
advice on equipment bebo Vanilla 5 February 7, 2009 10:04
Which equipment to prefer? Softwarer Vanilla 4 March 2, 2008 10:07


All times are GMT +1. The time now is 21:44.


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