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

Reply
 
Thread Tools Display Modes
  #11  
Old March 14th, 2007, 08:31 PM

llamabeast llamabeast is offline
National Security Advisor
 
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
llamabeast will become famous soon enoughllamabeast will become famous soon enough
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

Surely the trn file has everything an AI might need in order to play its turn, in the same way that it has everything a human needs to play its turn.

What Max needs to know, if I understand correctly, is if anyone knows what the format of the trn and 2h files is (the AI would need to create 2h files). I have no idea, but I presume the answer is that no one knows the formats. It's not obvious that there should be any problem with releasing them, though.
__________________
www.llamaserver.net
LlamaServer FAQ
My mod nations: Tomb Kings and Vampire Counts
A compilation of high quality mod nations: Expanded Nations Packs
Reply With Quote
  #12  
Old March 14th, 2007, 09:40 PM
Ygorl's Avatar

Ygorl Ygorl is offline
Captain
 
Join Date: Jun 2004
Location: Rhode Island
Posts: 822
Thanks: 0
Thanked 0 Times in 0 Posts
Ygorl is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

If we did have the file formats, it would open up a whole new arena of metagames... We could have AI contests!
Reply With Quote
  #13  
Old March 14th, 2007, 09:56 PM

Evil Dave Evil Dave is offline
Corporal
 
Join Date: Jan 2004
Location: Wilmington, Delaware, USA
Posts: 191
Thanks: 1
Thanked 13 Times in 2 Posts
Evil Dave is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

Quote:
MaxWilson said:
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).

Dominions' complexity is what I'm worried about with this method. The tests they ran were relatively simple (see section 6.2 starting on p26), but yet the AI took on average 20-30 battles against unchanging opponents to beat a static AI (table VI, p38). Given the much larger number of categories of spells, I'm not sure the AI could learn to counter players' tactics.

Still, since it looks like a genetic algorithm, it's probably the best approach there is for Dom3. I think it would be worth trying for some simple cases to see how well it does against the current tactical AI. (If the game has the right hooks, of course...)
__________________
No plan survives contact with the enemy.
--Helmut von Moltke

Have too may pretender files to keep track of? Use catgod to view them.
Reply With Quote
  #14  
Old March 14th, 2007, 10:39 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?

If you are interested in seeing the AI "think" you can turn on debug logging and direct it to a file. If you turn on debugging to an extensive level, you will get a HUGE file very quickly. In linux it would be -ddddddd >log.txt
In windows I think it might be just adding -ddddd and it goes automatically to log.txt (best viewed with WordPad since NotePad doesnt handle the unix style of formatting very well)
__________________
-- 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
  #15  
Old March 14th, 2007, 11:25 PM

Evil Dave Evil Dave is offline
Corporal
 
Join Date: Jan 2004
Location: Wilmington, Delaware, USA
Posts: 191
Thanks: 1
Thanked 13 Times in 2 Posts
Evil Dave is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

Oh, yeah. I watch it think frequently. But to take that and evaluate it against another AI would take simulating the "battle engine".

OTOH, that the game does produce that kind of output suggests that hooks to replace the AI might be in place. It looks like the game evaluates moves (spell choices, etc) for each unit on the battlefield, and then passes them off to other routines to carry out. If the evalution and "do this move" calls can be brought out to an API, it shouldn't be too hard to attach Dom3 to another AI. (He says, knowing nothing of Dom3's internals. )
__________________
No plan survives contact with the enemy.
--Helmut von Moltke

Have too may pretender files to keep track of? Use catgod to view them.
Reply With Quote
  #16  
Old March 15th, 2007, 12:04 AM
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?

Its written on linux (ubuntu to be specific) and then ported to mac and windows versions. Other than that.. you might look in the mod directory where some people have taken apart bits of it.

But generally, discussion of format internals has felt like it got kinda squashed in the past.
__________________
-- 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
  #17  
Old March 15th, 2007, 02:17 AM
Edi's Avatar

Edi Edi is offline
National Security Advisor
 
Join Date: Oct 2003
Location: Helsinki, Finland
Posts: 5,425
Thanks: 174
Thanked 695 Times in 267 Posts
Edi is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

The main discussions on format internals that have been going on here that I have seen have been related to the unit, spell and site formats to enable better modding and nothing integral to the mechanics of the game in the same way as people are talking about in this thread.

The spell modding issue is actually helpful since it allows wider modding of spells without tedious trial and error research to find what you need. The site and unit stuff is mainly useful for making the DB better than it already is and helping modders and mapmakers.

I'm rather uncomfortable with how so many people want to see the file structure for trn, 2h and fthrlnd files, given the abuse potential. I still remember the ****storm Norfleet managed to create when he got found out cheating and if the file format info is widely available, it's going to make similar incidents inevitable since less skilled people will be able to do similar things.
Reply With Quote
  #18  
Old March 15th, 2007, 03:16 AM
Ygorl's Avatar

Ygorl Ygorl is offline
Captain
 
Join Date: Jun 2004
Location: Rhode Island
Posts: 822
Thanks: 0
Thanked 0 Times in 0 Posts
Ygorl is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

Prior to hosting, the game could check the incoming .2h files against the .trn files that were sent out. Most everything should be the same, and what's different should be accounted for (or accountable for) by what's being hired, cast, forged, etc. I know something like this already happens when cheat detection is turned on, though I'm not sure how thorough it is. With that in place, it would be impossible to cheat on the client side. I'm not so concerned about cheating by the host; there are already plenty of ways the host can cheat, especially with the master password, and it hasn't been much (or any?) of an issue. Besides, we don't need the fthrland format to play with external AIs. We just need to know how to read a .trn and write a .2h. It would be such fun... Come on, Illwinter! Let us AI nerds play!
Reply With Quote
  #19  
Old March 15th, 2007, 03:47 AM
Arralen's Avatar

Arralen Arralen is offline
Major General
 
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
Arralen is on a distinguished road
Default Re: Atten Devs: AI (Rules-based dynamic scripting?

Sadly, neither AI scripting nor external AIs will work in/for Dom3 at it is now (we have been talking 'bout this before). The following is based what I know from Dom2 and beta-testing Dom3, and some details might have changed in the meantime. I doubt, though, that the underlying principle has changed:

scripting
There are no means in the engine to 'externalize' the AI to scripts. Some reasons already have been given - it effectily would require re-coding big parts of the engine.
Modding isn't comparable with AI scripting, because the mod commands are simply read in and the 'standard values' (variables) replaced before a turns orders are evaluated. During this evaluation the game works 'autonomous', starting with a special seed for a random sequence, which is saved with the turn file. Using this seed and the orders file, you can basically re-generate the turn every time you wish - the results are deterministic.
Or should be - this is the reason for the "battle inconsistency" bug which at some points occured. And maybe the 2 bug still prevalent: (non-)dieing pretenders and wrong battle outcomes.

external AI
Because the turn results are basically re-created based on the game rules, active mods and the turns random seed(s), an external AI would need to do the same to get the full overview over a turns results: One would have to redo Dom3 in the AI code to be able to do that. Might as well use the game engine itself ..

how to improve the AI
I dunno. I heard Johan doesn't like doing GUI because it's boring. I would think doing AI is more interesting, but I never got any direct feedback from him, even when I presented pseudo-code in the forum. On the other hand, the AI does build forts now. I have no idea if I had any influence in this, though.


Why the dynamic scripting shown in that paper will not work with Dominions
Quote:
excerpt p39:
Moreover, because dynamic scripting is designed to generate a
wide variety of tactics (in compliance with the requirement of variety),
it will never gain the upper hand if the tactic against which it is pitted
is so strong that there are very few viable counter-tactics. Against
human players, this means that dynamic scripting will achieve the most
satisfying results against non-expert players.

In a game that allows the design of ‘super-tactics’, which are al-
most impossible to defeat, dynamic scripting may not give satisfying
resultswhenusedagainstexpertplayerswhoknowanduseth esesuper-
tactics. However, every machine-learning technique will require more
computational resources finding rare solutions than finding ubiquitous
solutions. Therefore, against superior tactics, instead of using an online
machine-learning technique, in general it will be more effective to use
counter-tactics that have been trained against these optimal tactics in
an online learning process.

It should be noted that the existence of
super-tactics in a game is actually an indication of bad game-design,
because they make the game too hard when employed by the computer,
and too easy when employed by the human player.
Dominions is badly designed, scientifically speaking


-------------------------------------------------------------------------------------------
As for AI the most effective work around to this problem so far is to simply use an American instead, they tend to put up a bit more of a fight than your average Artificial Idiot.
James McGuigan on rec.games.computer.stars somewhen back in 1998
__________________
As for AI the most effective work around to this problem so far is to simply use an American instead, they tend to put up a bit more of a fight than your average Artificial Idiot.
... James McGuigan on rec.games.computer.stars somewhen back in 1998 ...
Reply With Quote
  #20  
Old March 15th, 2007, 06:17 AM

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?

@Evil Dave

I haven't played Neverwinter Nights, but I understand that its tactical space is also pretty large (300+ spells). Also note that they were starting from square one, with all rules equally-weighted, to test out the effectiveness of dynamic scripting itself. In practice you'd probably be starting from a known rulebase that works against "most players." But yeah, it's unlikely that this would produce a truly intelligent AI--I'd settle for merely an adaptive one, so that it's no longer meaningful to talk about how to beat "the computer" but rather "this computer."

Plus, I think the idea of AI programming metagames is a fun one.

-M.D.W.
__________________
Bauchelain - "Qwik Ben iz uzin wallhax! HAX!"
Quick Ben - "lol pwned"

["Memories of Ice", by Steven Erikson. Retranslated into l33t.]
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 07:38 AM.


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