![]() |
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. |
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!
|
Re: Atten Devs: AI (Rules-based dynamic scripting?
Quote:
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...) |
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) |
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. http://forum.shrapnelgames.com/images/smilies/happy.gif ) |
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. |
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. |
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!
|
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:
------------------------------------------------------------------------------------------- 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 |
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. http://forum.shrapnelgames.com/images/smilies/happy.gif -M.D.W. |
All times are GMT -4. The time now is 04:09 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.