.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
  #11  
Old March 1st, 2004, 08:20 AM
PhilD's Avatar

PhilD PhilD is offline
First Lieutenant
 
Join Date: Sep 2003
Location: Bordeaux, France
Posts: 794
Thanks: 0
Thanked 0 Times in 0 Posts
PhilD is on a distinguished road
Default Re: Programming Contest

Quote:
Originally posted by Saber Cherry:

Problem: Determine the best path for a mage to search friendly provinces. Yes, this is harder than it sounds to make optimal. But it is not very difficult to make a working solution, even though the description below may seem difficult.

What, exactly, do you want us to solve? What should be the output?

I mean, there are a lot of things one can optimize for. Number of searched provinces within X turns? Number of likely sites within X turns? First turn where one searches a province?
Reply With Quote
  #12  
Old March 1st, 2004, 09:16 AM
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: Programming Contest

The best path would be the one that wasted fewest gems. There would be 2 ways to determine the best solution.

1) The easy way. Scatter sites around, and determine how many gems were wasted before all provinces were searched. The person whose algorithm finds the most sites the quickest would win, even if it takes him the same amount of time to search all the sites as a worse solution. This would be done for several different site-scatterings, and the sites would be scattered according to terrain probability modifiers. Even if it was done many times, luck would still be a factor.

2) The better way. Sum the wasted probability-time... in other words, if you don't search a Plains province for 5 turns, you get penalized 50%*5. There are no real "sites", per se. For example, if there were 3 provinces, a Swamp (30%), a Forest(80%), and a Mountain(100%), where the numbers indicate their site frequency relative to mountains, and you started in the swamp...

Your output could be (substituting terrains for province numbers)

start swamp
search
move mountain
search
move forest
search
end

...which scores like this:
(30*0)+(100*2)+(80*4)=520

or:

start swamp
move mountain
search
move forest
search
move swamp
search
end

...which scores like this:
(30*5)+(100*1)+(80*3)=490

How does the scoring work? It is (swamp magic site richness)*(turns before searching the swamp)+(mountain magic site richness)*(turns before searching the mountain)+(forest magic site richness)*(turns before searching the forest), with the minimum number best.

In this case, since forests and mountains are richer in terms of magic sites, it is actually BETTER to move instead of searching first! You want to minimize the lost probability-time.

The other factors are search status and already-found sites, which affect probability. For simplicity, we'll assume that there are only level 0-3 sites, equally distributed by level and path, so that there are as many level-3 Unholy sites as level-0 Earth sites. Which is not true, but it makes things a lot easier.

I'll wait on the more complicated probabilities until I get more comments, but generally, if a province has already been searched, or already has some magic sites, the probability of finding new sites is reduced. Obviously, a province that has 4 sites, or that has been searched to level-3 (in Dominions, level-4) in all paths, cannot yield any more sites.

[ March 01, 2004, 07:18: Message edited by: Saber Cherry ]
__________________
Cherry
Reply With Quote
  #13  
Old March 1st, 2004, 09:37 AM

Norfleet Norfleet is offline
Major General
 
Join Date: Jan 2004
Posts: 2,425
Thanks: 0
Thanked 0 Times in 0 Posts
Norfleet is an unknown quantity at this point
Default Re: Programming Contest

I have a far more interesting, and far more immediately useful in-game, problem:

The challenge is simple: Be the first to fix Utgard Jotun in 2.08 without breaking anything else!
Reply With Quote
  #14  
Old March 1st, 2004, 09:40 AM
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: Programming Contest

Quote:
Originally posted by Norfleet:
The challenge is simple: Be the first to fix Utgard Jotun in 2.08 without breaking anything else!
It's easy to fix... trivial... but it can only fix new games, not current games. And you have to declare, "I'm playing Utgard" before the game even starts, since themes cannot be modded yet.
__________________
Cherry
Reply With Quote
  #15  
Old March 1st, 2004, 09:58 AM
Arryn's Avatar

Arryn Arryn is offline
Major General
 
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
Arryn is on a distinguished road
Default Re: Programming Contest

Quote:
Originally posted by Saber Cherry:
quote:
Originally posted by Norfleet:
The challenge is simple: Be the first to fix Utgard Jotun in 2.08 without breaking anything else!
It's easy to fix... trivial...
The fixes I have seen do not fix the entire theme, only the Seithkona. There's more wrong with it than that.
__________________
Visit my Dominions II site
Reply With Quote
  #16  
Old March 1st, 2004, 10:03 AM
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: Programming Contest

You just have to clear the nation, and then do #addunit and #addleader for each unit and leader, and specify the correct magic site. As far as I know...
__________________
Cherry
Reply With Quote
  #17  
Old March 1st, 2004, 10:26 AM

Norfleet Norfleet is offline
Major General
 
Join Date: Jan 2004
Posts: 2,425
Thanks: 0
Thanked 0 Times in 0 Posts
Norfleet is an unknown quantity at this point
Default Re: Programming Contest

Quote:
Originally posted by Saber Cherry:
You just have to clear the nation, and then do #addunit and #addleader for each unit and leader, and specify the correct magic site. As far as I know...
Ah, but you see, it's not quite that simple: A simple mod doesn't have the capability to modify themes: A .MAP would have to be applied for every map that somebody wants to play Utgard around. None of these are obviously total solutions. That's why it's a contest! Somebody may actually have to hex the things in! Now *THIS* is a contest!
Reply With Quote
Reply

Bookmarks

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 On

Forum Jump


All times are GMT -4. The time now is 10:28 PM.


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