.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 3: The Awakening

Reply
 
Thread Tools Display Modes
  #1  
Old July 18th, 2007, 12:37 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: request for new patch: an ai that can learn

Statistical AI could be as simple as observing that "when I take both death-3 and misfortune-3 (as Bandar Log), my empire dies 30% faster. Bad combination, stay away."

I would much rather have an API of some kind for the AI (even documentation for the .trn and .2h files might do) so that people can write their own AIs. That way they can use nation-specific tactics, can learn if you want them to, can be passed on to other players, etc. Making Illwinter write another AI, given that we already have a pretty decent one, seems like a lot to ask.

Edit: oh, I forgot. It would be nice if you could designate human-controlled players with the same anti-handicaps as Difficult/Mighty/Impossible AIs, since AI players would "look" like humans from the host's perspective. It might also be fun for new players to receive a competitive advantage.

-Max
__________________
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 July 18th, 2007, 12:50 PM
Wahnsinniger's Avatar

Wahnsinniger Wahnsinniger is offline
Private
 
Join Date: Jul 2007
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Wahnsinniger is on a distinguished road
Default Re: request for new patch: an ai that can learn

The Scriptable AI is something I didn't even think about. That IS a good idea. Especially since the game isn't real-time, scriptable AI works great.

Quote:
MaxWilson said:
Statistical AI could be as simple as observing that "when I take both death-3 and misfortune-3 (as Bandar Log), my empire dies 30% faster. Bad combination, stay away."
So you mean, between games, the Game would try to figure out what works and what doesn't? Seems like it'd just be easier for the devs to hardcode in good combinations, and choose which combinations to avoid, Instead of spending a bunch of time writing Statistical stuff.

The other (more useful) learning AI would continually check throughout a game: "Hmmm, Nation X keeps dominating me with lots of blessed units. Switch production and research to a bunch of Battlefield Mages". But that requires alot of coding itself, and you either have to script in specifically what changes it would make and end up with a inflexible system, or write a Very flexible system which would be unreliable and difficult to code.
__________________
Given infinite time, a thousand monkeys with a thousand keyboards would eventually write the entire workings of Windows Vista.
Dwarf Fortress: The Grand Sixth Hall
Reply With Quote
  #3  
Old July 18th, 2007, 01:08 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: request for new patch: an ai that can learn

The thing about the statistical stuff is that 1.) it can depend on the opponent, and 2.) it can extract knowledge that the developers don't have. To wit, in some playing circles with a very aggressive set of players, taking death-3 might be a no-brainer, whereas if most players are defensive and borders are static growth becomes more desirable. Moreover, if the opponent begins to adjust to your strategy a learning AI can re-adjust its style (between games) when it starts to become ineffective. The approach of hardcoding "good combinations" is how most AI seems to be done, and it works well until you figure out the weak points. Dom3 has a good, strong AI, until you figure out the things it can't handle (SCs). At that point you either exploit those things or stay away from them, but a human player would lose a game or two and then, if you kept on using SCs, shift its strategy to deal with them at the expense of a weaker anti-magic defense or something. (E.g. build more mages and fewer huge armies, construct some Rods of the Phoenix and sprinkle them around.) A learning AI would need to have the right tools in its learning toolbox--in its simplest form it has a number of hardwired strategies and selects among them based on what is working--but without the ability to learn from your opponent's behavior you *cannot* prevent your AI from getting exploited eventually. There's no guarantee that any given learning AI would be able to deal with any given player tactic, which is why it would be good to have an API, so you can add more tools to the learning toolbox when needed.

-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 July 18th, 2007, 01:51 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: request for new patch: an ai that can learn

That level of AI would have to be done by someone specializing in AI from the beginning, and adding the game after (like GalCiv). Or have an AI programmer working closely (which the Dom game doesnt support)

Personally Id rather see hooks for external AI bots such as VGA Planets supports. Like MUDs have. A full text interface would allow for anyone to program a bot-player to act as an AI. That would not only allow for fantastic AIs that can learn, but also for a huge variety. One person can concentrate on a researcher style. One can do a barbarian horde style player. One can do a stealth style. One could write the Ultimate Ermor Challenge bot and take continual suggestions on improving it.

Every developer has things they do well, and things they dont. Im not one to gripe on the things they cant do but I will suggest that they open the door to allow others to do it for them (graphics, sounds, mods, maps, AI, help manuals) instead of trying to hold the door closed.

As for Dom3, we are closer than you think. The text output is extensive. And editing of trn/2h files is in reach. Im just not sure if we want to proceed down that path without the help and blessing of the devs.
__________________
-- 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
  #5  
Old July 18th, 2007, 03:18 PM

Loren Loren is offline
First Lieutenant
 
Join Date: Nov 2006
Posts: 739
Thanks: 1
Thanked 8 Times in 8 Posts
Loren is on a distinguished road
Default Re: request for new patch: an ai that can learn

You don't realize how complex such an AI would be.


There is one thing that could be done for the AI, though--take it out of the game.

Instead, put the AI in a .dll. Publish the interface to the .dll. The name of the .dll would be an option when setting up a game. Allow the community to write AI's for it.
Reply With Quote
  #6  
Old July 18th, 2007, 03:51 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: request for new patch: an ai that can learn

Actually, I really like that .dll idea. The thing I like about interfacing through .2h and .trn files is that the infrastructure is already there, and you could write your AI in any language--but there are also concerns about possible hacks. A .dll could still implement the AI in another language by spawning an AI process and communicating with it through a pipe.

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

["Memories of Ice", by Steven Erikson. Retranslated into l33t.]
Reply With Quote
  #7  
Old July 19th, 2007, 02:01 AM

Loren Loren is offline
First Lieutenant
 
Join Date: Nov 2006
Posts: 739
Thanks: 1
Thanked 8 Times in 8 Posts
Loren is on a distinguished road
Default Re: request for new patch: an ai that can learn

Quote:
MaxWilson said:
Actually, I really like that .dll idea. The thing I like about interfacing through .2h and .trn files is that the infrastructure is already there, and you could write your AI in any language--but there are also concerns about possible hacks. A .dll could still implement the AI in another language by spawning an AI process and communicating with it through a pipe.

-Max
Yeah, you've got a point about hacks.

Ok, a separate .exe that links a .dll that provides an API for dealing with the world, reading the .trn file, writing the .2h file etc. No data it's not allowed will even be in it's memory space. Have the main game engine read in the .2h file and check the legality of the orders in it.

To help things along I would suggest releasing the source for the AI. It wouldn't cost any sales--without a Dominions game the code is worthless.
Reply With Quote
  #8  
Old July 18th, 2007, 04:16 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: request for new patch: an ai that can learn

Quote:
Loren said:
You don't realize how complex such an AI would be.


There is one thing that could be done for the AI, though--take it out of the game.

Instead, put the AI in a .dll. Publish the interface to the .dll. The name of the .dll would be an option when setting up a game. Allow the community to write AI's for it.
Kindof the same thing I said. External AIs. Except that mine would open it up to more people I think than a dll.

As long as it allows 3rd party AIs without compromising the security of the games internal files then Im all for it.
__________________
-- 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
  #9  
Old July 18th, 2007, 04:22 PM
Kristoffer O's Avatar

Kristoffer O Kristoffer O is offline
General
 
Join Date: Aug 2003
Location: Sweden
Posts: 4,463
Thanks: 25
Thanked 92 Times in 43 Posts
Kristoffer O is on a distinguished road
Default Re: request for new patch: an ai that can learn

dll are windows only, right? That makes Gandalfs proposal a lot more likely. Nothing will be developed unless it is first made to work under linux. The Windows version is a bonus to all those people who happen to have a windows computer besides their linux
In other words, JK develops the game in linux, and tries to make it work under windows and Mac OSX as well. It usually does. He is fascinated with operating systems (or was, when development of dom-ppp begun).
__________________
www.illwinter.com
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 02:42 PM.


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