Listening for Game Commands in Replays

34 views
Skip to first unread message

MHesham

unread,
Dec 22, 2013, 2:21:34 PM12/22/13
to bw...@googlegroups.com
Hi folks,

I am working on extracting game traces from Starcraft replays, but unfortunately replays are not enough as traces, I still need Game State which canno't be extracted from nowhere but a live game replay.
I have the idea of extracting game Actions from the replay and rerun the replay using BWAPI and on each action frame record game state for that action to get a complete game trace.

I`d like to know if there are better ways to do it.
Can I just run the replay without extracting game actions offline, and just run the replay with BWAPI and be able on each frame to access some internal game commands queue to extract the issued commands to Starcraft in the replay?

Regards,
Muhamad

Krasimir Krystev

unread,
Dec 23, 2013, 11:34:59 AM12/23/13
to bw...@googlegroups.com
The best way is to rerun the replay unless you are willing to reimplement the whole SC BW game engine...


--
 
---
You received this message because you are subscribed to the Google Groups "bwapi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bwapi+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
BR

gabriel synnaeve

unread,
Dec 23, 2013, 11:46:35 AM12/23/13
to bw...@googlegroups.com

MHesham

unread,
Dec 23, 2013, 4:13:56 PM12/23/13
to bw...@googlegroups.com
I understand that your tool dump replays to as sequence of strings in text files not a binary format that can be serialized/deserialized, right?

gabriel synnaeve

unread,
Dec 23, 2013, 4:30:22 PM12/23/13
to bw...@googlegroups.com

Yes in text files. It dumps events as you asked in first mail. You can look up in the source on github (seek an onFrame() function IIRC). Sorry I'm just on my Android.

gabriel synnaeve

unread,
Dec 23, 2013, 4:33:46 PM12/23/13
to bw...@googlegroups.com

It also dumps the state of the game (positions, battles, etc.).

Santiago Ontanon

unread,
Dec 23, 2013, 4:46:02 PM12/23/13
to bw...@googlegroups.com
Even I want to check it out. I did a while back a little BWAPI program that dumped the evolution of the game state while reproducing a .rep file. But it spits out an enormous file for each rep (about 30 - 40MB) with the game state, since I save every single detail in the game at each single frame. So, it does not scale very well to run it on a large set of replays.

On Dec 23, 2013, at 4:33 PM, gabriel synnaeve <gabriel....@gmail.com> wrote:

It also dumps the state of the game (positions, battles, etc.).


gabriel synnaeve

unread,
Dec 23, 2013, 5:02:39 PM12/23/13
to bw...@googlegroups.com

I just saved the changes of state, and for the positions, I dump them every 4 seconds if changed IIRC. That's smaller but still makes a big dataset for almost 8k games.

MHesham

unread,
Dec 23, 2013, 5:53:00 PM12/23/13
to bw...@googlegroups.com
The benefit of dumping game states is that you can let your engine do Offline learning overnight without depending on SC anymore, but the challenge of scalability still remains as you mentioned.
I think game state optimization is something to look at. The problem is that such optimizations will differ from AI engine to another, and hard to generalize. I find serializing only game state deltas is not bad, but one have to compromise accuracy which may lead to incorrect reasoning. But thanks to machine learning that the engine can learn to optimize his game states for offline learning, and know which states component is more critical to update more frequently than the other.

gabriel synnaeve

unread,
Dec 24, 2013, 5:34:21 AM12/24/13
to bw...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages