Go Back   Angband Forums > Angband > Vanilla

Thread Tools Display Modes
Old September 13, 2009, 04:31   #1
Join Date: Feb 2009
Posts: 30
juggle5 is on a distinguished road
Equipment Optimizer

I've always wanted to write a program to help me determine what items I should be wearing in Angband. Well, I finally got around to making one! I thought I'd post it here and give back a tiny bit to the Angband community.

It's a command-line tool. Basically, you fill in a spreadsheet that describes what equipment you have and what attributes are important, then run the tool with the spreadsheet as input. The problems I see right now are:
  1. It's a little tedious to enter in all the data for your stuff, especially if you have 30-40 items.
  2. It's difficult picking good weights for how important everything is. I have reasonable values in an example file, but please let me know if you get better ones.

I have a pre-compiled binary for Mac OS X 10.5. Otherwise, you'll have to compile it yourself. It's just C code, but it relies on the "lpsolve" library (needed to solve integer linear programming problems). There's a README that has more detailed instructions. If you get it working on another system, I'm sure others would appreciate it if you can post a binary somewhere.

Source + Mac Binary

Source Only
juggle5 is offline   Reply With Quote
Old September 13, 2009, 14:07   #2
Join Date: Apr 2009
Location: Berlin / Italy
Posts: 818
fph is on a distinguished road
I have been working on the same problem, I hope we can join efforts. I'll send you a pm with my e-mail address shortly.

1) The data-entering part can be avoided with a parser that inputs a character dump. I have some Perl code for that.
2) I was thinking about building a problem description in GNU Mathprog (the native modelling language for the glpk IP solver, I think it's a common format); but using this or C, like you did, is only a matter of taste.
3) My first idea was something close to your modelling, but now I think stackable items should be modelled in a slightly different way that is closer to their "real" in-game meaning:
a) for each attribute, you have a variable that is constrained to its maximum "meaningful" value: e.g., constraints sum_i RFire[i] >=1, Speed[i]>=40.
b) for each object i, if it provides said attributes, then it increases the variable: e.g., a ring of resist fire has RFire[i]=1, a ring of speed +10 has Speed[i]=10
c) you have a set of "dummy objects" that provide each attribute: e.g. a DummyNoFireResist object that has RFire[DummyNoFireResist]=1, a DummySpeedAround30 that has Speed[DummySpeedAround30]=10.
d) each "dummy object" has a "badness" value; minimize the total badness
e) slots are modelled in the obvious way

The dimension of the problem increases, but this is not a concern; on the other hand, you have a more meaningful modelling of things like speed: speed 40 is not twice as good as speed 20. In "real" Angband life, this is not linear.


Last edited by fph; September 13, 2009 at 14:24.
fph is offline   Reply With Quote

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
Help with endgame equipment bebo Vanilla 6 May 3, 2009 17:23
Starting Equipment bobthegreat Vanilla 13 April 22, 2009 22:45
advice on equipment bebo Vanilla 5 February 7, 2009 09:04
Which equipment to prefer? Softwarer Vanilla 4 March 2, 2008 09:07
[V/NPP] Equipment optimizer - scoring rules pav Vanilla 6 May 27, 2007 13:17

All times are GMT +1. The time now is 08:09.

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