.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #38  
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
 

Bookmarks


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 On

Forum Jump


All times are GMT -4. The time now is 12:03 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.