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

This Month's Specials

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

   







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

Reply
 
Thread Tools Display Modes
  #41  
Old March 3rd, 2004, 08:34 PM

atul atul is offline
Captain
 
Join Date: Oct 2003
Location: Finland
Posts: 883
Thanks: 14
Thanked 11 Times in 9 Posts
atul is on a distinguished road
Default Re: Better, Simpler Programming Contest

Quote:
Originally posted by Saber Cherry:
I'd like to point out that if your first bunch of longbows were wiped out by fliers, that might indicate your enemy was routinely using fliers on "attack archers", and thus halting archer production would be wise=)

Agreed, poor example, just had to come up with something in a hurry. But if you were to halt the archer production, you would need to have a way of deciding when to start it again.

if(x kill all y) then (no y) until (x is driven to extinction) ? Loop enough times and it wouldn't produce anything anymore.

Maybe that would be a broader question of AI logic as a whole. :>
Reply With Quote
  #42  
Old March 3rd, 2004, 08:35 PM
LaFollet's Avatar

LaFollet LaFollet is offline
Private
 
Join Date: Mar 2004
Location: Canada
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
LaFollet is on a distinguished road
Default Re: Better, Simpler Programming Contest

One thing at a time people!!! There's only so much that can be done.
But I love the ideas.

The only problem is that to get the current value of a "unit population" would require getting that information from Dominions, which we can't do without decompiling it, which I'm QUITE sure is against the EULA...

But I also know that this program only has application inside of Dominions, so I'm still going to make it, and it's still going to produce a "balance" of units on the first turn.

And I'd just like to note that by using a "unit population" reinforcements would be made for armies who suffered casualties in any of their Groups, and would be made at the same time that further "balanced" armies were being made.
Reply With Quote
  #43  
Old March 3rd, 2004, 09:25 PM
LaFollet's Avatar

LaFollet LaFollet is offline
Private
 
Join Date: Mar 2004
Location: Canada
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
LaFollet is on a distinguished road
Default Re: Better, Simpler Programming Contest

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: -224 (Edit from -72 cause it was wrong)

Total Score: 160 (Changed cause of Edit)


Original Test data produced these results:

4 c
1 d
2 b
6 a

Gold Remaining: 6
Resources Remaining: 17
Holy Remaining: 0

Score for units: 129
Score for Resources: -3

Total Score: 126


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?

[ March 03, 2004, 20:33: Message edited by: LaFollet ]
Reply With Quote
  #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
  #45  
Old March 3rd, 2004, 10:27 PM

Scott Hebert Scott Hebert is offline
Second Lieutenant
 
Join Date: Feb 2004
Location: Titusville, FL
Posts: 450
Thanks: 0
Thanked 0 Times in 0 Posts
Scott Hebert is on a distinguished road
Default Re: Better, Simpler Programming Contest

While I find all of this intriguing, unfortunately I know nothing of 'real' computer programming. However, I would be willing to try to work out 'base values' for units.

Something that may help is to base unit value off of something that I would refer to as 'survivability', and this value would be calculated as

HP/Min((Avg. Dmg. - Prot.), 1)

As you can see, Survivability is the average number of hits one can take before dying. While this favors heavy infantry... I believe that is the current trend among players. I'd like to factor Morale in as well, but I'm not sure how.

Let's take an example of HI and LI. Both have 10 HPs, and let's assume that the HI has Prot of 11, the LI has Prot of 6. Finally, let's assume the average damage in this game is 12.

The HI would have a SUR value of 10/(12-11), or 10. The LI would have a SUR value of 10/(12-6), or 1.67. This would mean that HI is worth 6 times as much as LI, from a pure survivability standpoint.

Now, one method of determining average damage that I think would be interesting is to have it compute the average damage of all units that he is aware of. By 'aware of', I would mean that it would calculate based on all National units of nations that it is in contact with. If it can access ind. province's information, it would also include their information as well.

I kind of like, though, how giants skew everything. With giants in the game, the computer would probably tend to produce LI.

Anyway, more later.

Bayushi Tasogare
__________________
Scott Hebert
Gaming Aficionado
Modding Beginner
Reply With Quote
  #46  
Old March 3rd, 2004, 10:27 PM
LaFollet's Avatar

LaFollet LaFollet is offline
Private
 
Join Date: Mar 2004
Location: Canada
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
LaFollet is on a distinguished road
Default Re: Better, Simpler Programming Contest

I never said it was optimized, I just said that it was the current results, which is pretty nice mix of units, if not the best mix of units for the resources provided, and as far as resource cost go, I think I forgot to count spent gold against and unspent gold for... Not really the what I've been focusing on.
Also, you can increase the score by removing the salamander, but that's only because the resources the salamander use are more valuable then the salamander is, but that's just using the current "value" system, which isn't what we've agreed on using anyways.

The real point of this is the fact that this queue design will allow for all types of units that can be produced to be produced, not adding in the possiblity of using "unit population" numbers.

EDIT
Not what I thought it was, had the resource score values hard coded, even though I had the values being loaded with all the other data. Will fix and edit the results post.

Edit
Been playing around with the delay I built in, made it so it can be changed to emphasize the value, resources, gold, or holy. All this does is change how long a unit will wait to be added into the queue so that units with less of whatever the emphasized resource is will be made more often. These are the best results got by emphasizing Holy:

1 lavawarrior
2 morningstar
2 battleaxe
1 salamander
1 humanbred

Gold Remaining: 25
Resources Remaining: 2
Holy Remaining: 3

Score for units: 384
Score for Resources: -214

Total Score: 170

Also worthy of note, 7 units are produced this way, with the max units produced with "emphasizing" being 8 with a score of 156

[ March 03, 2004, 21:14: Message edited by: LaFollet ]
Reply With Quote
Reply

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:35 PM.


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