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

This Month's Specials

The Star & the Crescent- Save $9.00
winSPWW2- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

Reply
 
Thread Tools Display Modes
  #1  
Old March 14th, 2007, 05:04 PM

MaxWilson MaxWilson is offline
Major General
 
Join Date: Mar 2007
Location: Seattle
Posts: 2,497
Thanks: 165
Thanked 105 Times in 73 Posts
MaxWilson is on a distinguished road
Default Atten Devs: AI (Rules-based dynamic scripting?)

Here's a paper on an AI technique called dynamic scripting. The authors took a complex tactical game (Neverwinter Nights) with a script-based AI, and were able to show that a learning algorithm can 1.) pick out effective combinations of rules vs. different play styles, and 2.) adjust difficulty to "barely lose, in interesting ways" against human players of different skill levels. They also report that a later, improved AI from the game developer resembled the scripts the algorithm learned by itself at much less effort.

http://www.cs.unimaas.nl/p.spronck/P...cScripting.pdf

I wonder whether this is something that can be applied to Dominions. I don't know whether the strategic AI is rules-based, but a learning AI does seem to be well-suited to Dominions because 1.) tactical combat is AI-controlled anyway, so you don't need to worry about self-trained AIs somehow missing out on tactical "tricks" because of e.g. bad pathfinding, 2.) AIs can easily play games against themselves because the engine is fast, 3.) the strategic space is *huge*, with many different and interesting counters possible to any specific tactic, so even a fairly dumb hill-climbing search may stumble across a good counter to, say, E9N9 Niefelheim (e.g. race for Alt-6 and Iron Bane).

I'm still kind of new to Dominions, but is writing AI rules something that can be done in a mod, or is it something only the devs can do? I'd love to implement "dynamic scripting" and see what kind of AIs fall out.

Also check out http://rolec.unimaas.nl/.

-Max Wilson
__________________
Bauchelain - "Qwik Ben iz uzin wallhax! HAX!"
Quick Ben - "lol pwned"

["Memories of Ice", by Steven Erikson. Retranslated into l33t.]
Reply With Quote
  #2  
Old March 14th, 2007, 05:21 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

Neverwinter Nights is a great game but it was built from the ground up to be scripted. From the beginning of Dominions Ive mentioned scripted AIs. Some great games are out there where players have created programs you can run which will play the enemy like it was another player.

Unfortunately adding it to a game later is like starting over. For everything that the AI does there would have to be a "hook" written in. Variables and commands. Such as, giving a commander an item would requre variables for the slots and ways to detect if it already has something. Or making a move would require variables for neighbors and commands for looking, evaluating, etc. Those are in the game of course but they usually arent done in a clear variable that can be "seen" from outside the game.

The closest we get right now are the modding commands (which there are alot of and more all the time)

Maybe for Dom4. But I think it might be something that would be so involved that they would just write a new game instead.
IMHO
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #3  
Old March 14th, 2007, 05:45 PM

MaxWilson MaxWilson is offline
Major General
 
Join Date: Mar 2007
Location: Seattle
Posts: 2,497
Thanks: 165
Thanked 105 Times in 73 Posts
MaxWilson is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

I appreciate the point about Neverwinter Nights, and if the Dominions AI isn't internally doing scripting I guess it wouldn't be trivial to make it learn. Still, I wonder if the PBEM aspect of Dom3 offers enough "hooks" to build a scripting AI client anyway; you'd have to know how to write .trn files and, as you pointed out, how to read game state like "who controls province #33 this turn, and how many units do I see in it?" and "What items is my Pretender carrying?" It doesn't necessarily have to tie into the existing AI engine, but at least in principle the PBEM orders/execution/results division offers everything you need to write a learning engine.

Even if it did have to wait for Dom4, which I hope it doesn't (I'm off to look at my .trn files in a minute and try to figure out what's in them), an adaptive AI would be incredible for us SP folks and a real selling point. Not that Dom3 is lacking in selling points. Terrific game, even if I just discovered it three weeks ago.

-Max
__________________
Bauchelain - "Qwik Ben iz uzin wallhax! HAX!"
Quick Ben - "lol pwned"

["Memories of Ice", by Steven Erikson. Retranslated into l33t.]
Reply With Quote
  #4  
Old March 14th, 2007, 05:47 PM

MaxWilson MaxWilson is offline
Major General
 
Join Date: Mar 2007
Location: Seattle
Posts: 2,497
Thanks: 165
Thanked 105 Times in 73 Posts
MaxWilson is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

By the way, how much AI programming can you do with the mod commands?

-Max
__________________
Bauchelain - "Qwik Ben iz uzin wallhax! HAX!"
Quick Ben - "lol pwned"

["Memories of Ice", by Steven Erikson. Retranslated into l33t.]
Reply With Quote
  #5  
Old March 14th, 2007, 06:10 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

You cant really change how the AI thinks. But with map commands you can build an AI nation that makes better use of the AI brain.

With mod commands you can change just about everything. Remove units and spells you feel its using too much, patch weak points that are too well known and abused by players, etc etc.

Its not really a bad AI (IMHO) but the random generation when it sets up a nation makes it rare that you get one where the setting choices match that nations best abilities. Manually making an AI would tend to work better.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #6  
Old March 14th, 2007, 07:00 PM

JayThomas JayThomas is offline
Corporal
 
Join Date: Dec 2003
Location: Buffalo, NY, USA
Posts: 143
Thanks: 0
Thanked 4 Times in 1 Post
JayThomas is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

This is a very interesting point. Perhaps, instead of selecting AI in game set-up, a human is selected and a script would generate a turn using the ftherlnd file, if that file contains data the AI could use.

Just thinking out loud.
Reply With Quote
  #7  
Old March 14th, 2007, 07:25 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

Making the fatherland formating available in general would create a situation for cheating.

But if the game shifted to a fatherland for each nation then it might work.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #8  
Old March 14th, 2007, 07:59 PM

MaxWilson MaxWilson is offline
Major General
 
Join Date: Mar 2007
Location: Seattle
Posts: 2,497
Thanks: 165
Thanked 105 Times in 73 Posts
MaxWilson is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

Gandalf,

I thought that in MP only the host has the ftherlnd file. Are you thinking of cheating by the host? Depending on how much information is in .trn files I can see how cheating could be an issue (it could let you observe battles you have no way of knowing about, or see the distribution of forces across enemy empires), but I didn't think that sort of information wound up in .trn files.

How much is actually known about what resides in each file?

-Max
__________________
Bauchelain - "Qwik Ben iz uzin wallhax! HAX!"
Quick Ben - "lol pwned"

["Memories of Ice", by Steven Erikson. Retranslated into l33t.]
Reply With Quote
  #9  
Old March 14th, 2007, 08:09 PM

JayThomas JayThomas is offline
Corporal
 
Join Date: Dec 2003
Location: Buffalo, NY, USA
Posts: 143
Thanks: 0
Thanked 4 Times in 1 Post
JayThomas is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

In SP, the .trn, .2h and ftherldn files are all in the save game directory.
Reply With Quote
  #10  
Old March 14th, 2007, 08:11 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

The fatherland does exist only on host. But at this time even the host does not have that level of access to the games. It might not be a problem but it would be a nasty one-way trip if it turned out to be one. Actually, the level of info available by the debug command concerns me enough as things are now.

The internal formats are rarely discussed.

If the faatherland was broken up by players or created seprately for the AI then it could be accessed seperatly without knowing everything about everyone. That would probably be best anyway since it would allow for creating a view of teh world that includes only what the AI has "seen".
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
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 11:02 PM.


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