View Single Post
  #44  
Old March 3rd, 2004, 09:45 PM
Saber Cherry's Avatar

Saber Cherry Saber Cherry is offline
Major General
 
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
Saber Cherry is on a distinguished road
Default Re: Better, Simpler Programming Contest

Quote:
Originally posted by LaFollet:
Alright, my current program produces these results from the new test data:

1 lavawarrior
1 morningstar
2 battleaxe
1 salamander
3 humanbred

Gold Remaining: 15
Resources Remaining: 10
Holy Remaining: 3

Score for units: 384
Score for Resources: -72

Total Score: 312

(...)

I added in a simple calculation to make units that cost more gold and resources combined will be added less frequently then those that cost less. What do you think of the results?
Hmmm....

code:
unittypes=5
unitname=humanbred gold=15 res=11 holy=0 value=29
unitname=battleaxe gold=20 res=27 holy=0 value=53
unitname=morningstar gold=20 res=30 holy=0 value=58
unitname=salamander gold=70 res=1 holy=0 value=42
unitname=lavawarrior gold=55 res=30 holy=1 value=91

I would say the output is non-optimal

For example, adding 2 morningstars and removing 2 battleaxes gives you the following results:

1 lavawarrior
3 morningstar
1 salamander
3 humanbred

Gold Remaining: 15
Resources Remaining: 4
Holy Remaining: 3

Score for units: 394
Score for Resources: -72

Total Score: 322

...and simply removing the salamander would increase the score:

1 lavawarrior
3 morningstar
3 humanbred

Gold Remaining: 85
Resources Remaining: 5
Holy Remaining: 3

Score for units: 352
Score for Resources: -2

Total Score: 350


So it produces a valid output, but is not quite optimal yet

Actually... in retrospect... something is wrong with your "resources" number. Are you using the correct values? For "Abysia" I set them at gold=-1, res=0, holy=6, so using 230 gold and 1 holy should result in a resource score of -1*230 + 6*1 = -224.
__________________
Cherry
Reply With Quote