Page 1 of 1

Simulation Database

Posted: Thu Jun 03, 2010 5:20 pm
by doomshot
Is it possible to store games of Defcon? I had an idea for the AI built around storing various simulations and trying to get it to extrapolate from that. What I mean is that, is it possible to record the game and replay later as a spectator?

Posted: Thu Jun 03, 2010 6:29 pm
by xander
It is possible. You will need a copy of dedcon to make it work. Searching the forums should get you started.

xander

Posted: Thu Jun 03, 2010 6:31 pm
by Ace Rimmer
Dedcon and Botcon are not compatible, though the bot itself can spectate (I think). I don't think you can gather information from spectating though, per the Defconapi Archive:

Fri Dec 11 11:27:49 CST 2009

Hi,
I wanted my bot to watch already recorded games and gather some
information from it, but it doesnt seem to work.
Do the Bot funktions actually get called while spectating?


There was never any response to this. I believe Robin mentions somewhere about creating/having a learning bot that gathers data from the game while it's (the bot) playing.

Posted: Thu Jun 03, 2010 7:04 pm
by doomshot
Alright, thank you for your help. Hopefully I can try to whip something up. Will post again if I get it working.

Posted: Thu Jun 03, 2010 8:54 pm
by bert_the_turtle
Ace Rimmer wrote:Dedcon and Botcon are not compatible
Sure they are! You just need to tell dedcon to claim to be of the exact same version as botcon.

Posted: Thu Jun 03, 2010 9:05 pm
by Ace Rimmer
I thought for certain I had seen somebody try it and only get Defcon to crash. Unfortunately, having trouble locating such a post.

Instead, for your viewing pleasure [emphasis mine]:

bert_the_turtle wrote:No. Dedcon has no idea about the game state and won't be able to drive a bot's interface. You need the bot enabled defcon version, and that is unfortunately officially incompatible with 1.43, so just sticking it out there will not give your bot a single bit of experience :)

(In practice, it is not incompatible. If you take a hexeditor and edit the version info the bot enabled version to be 1.43, you can join and host games with other 1.43 users no problem. Doing so, of course, is an EULA violation.)


:P

Posted: Fri Jun 04, 2010 9:41 am
by trickser
Ace Rimmer wrote:Dedcon and Botcon are not compatible, though the bot itself can spectate (I think). I don't think you can gather information from spectating though, per the Defconapi Archive:

Fri Dec 11 11:27:49 CST 2009

Hi,
I wanted my bot to watch already recorded games and gather some
information from it, but it doesnt seem to work.
Do the Bot funktions actually get called while spectating?


There was never any response to this. I believe Robin mentions somewhere about creating/having a learning bot that gathers data from the game while it's (the bot) playing.

The answer was no, Bots cant spectate.

I also tested it. It doesnt work. While I was able to make the Bot-version connect to a Replay, it just will not export any data to the Bot.

Posted: Fri Jun 18, 2010 2:15 am
by trickser
Hm
I tired to connect the BOT version with a replay in a more tricky manner. I started dedcon with

Code: Select all

dedcon -c "JoinAs 0" -c "JoinAt 10000" -l replay.dcrec

But Defcon crashed every attempt. But this might be an wine issue.

Can someone with native Windows verify, please?

Edit, nvm, ServerName must start with [BOT], so you have to add

Code: Select all

-c "ServerName [BOT]blah"


----

Anyway, no result :(

Posted: Fri Jun 18, 2010 4:23 pm
by trickser
Next best possibility:
decode dcrec files
split commands by TeamID
transform into API commands
Let one BOT per player execute the commands at given SeqID, recreate the game by BOTs copying player actions.

Too much work, too much CPU time :(

Why oh why isnt it build into the API?