Winner statistical prediction

83 views
Skip to first unread message

David Leblanc

unread,
Oct 14, 2012, 1:08:52 AM10/14/12
to sc2ge...@googlegroups.com
I'm doing a project for my Machine Intelligence class to predict and/or give a statistical measurement of advantage for a certain player during a game. My goal is to train a system that can give a prediction of who will win at any given point in a game, based on units built, buildings, tech, etc... I have tons of replays from MLG which I will use to train my system. I understand that it is impossible to get certain information from a replay, such as units lost, income, and other things. So I may have to just use the events and actions of the replay and use the cumulative data to train. But I have a few questions:

1) Can you recover that missing information in a real-time live game?
2) From what I understand, there's a way to get the GameStatus, and get the "values". I was confused on what those values and valueOf are. Can someone shine some light on how that works? Is that how we could recover some of that missing data?
3) Since I have tons of replays, how would I extract the data from multiple replay?
4) If we can get that missing data, can we get it by playing a replay in sc2 and getting that data as the replay is playing? If so, is there are way, for multiple replays, to play a replay, close sc2 when done, and automatically load the next replay?

I'm asking because I have like 3500 replays I want to extract data from, and I don't want to do that all manually. I figured using the sc2gears API makes the most sense. My goal would be to have separate files for each replay and then load them later to train my system. Can anyone give me some direction or clues?

Thanks

PS: I have no experience with Java so I'm still learning, I mostly do C++.

András Belicza

unread,
Oct 14, 2012, 10:11:16 AM10/14/12
to sc2ge...@googlegroups.com
Hi,

1) Sure, when watching a replay, the SC2 game engine can and does calculate all the info that is missing from the replay.
2) The GameStatus is an enumeration of possible game statuses which Sc2gears can detect, for example whether there is a game in progress. In Java enums have predefined methods, the values() and the valueOf() methods are examples. The values() returns an array of all values of an enum type, the valueOf() returns an enum instance from its string representation.
3) You can extract actions from any number of replays. Select all, right click in Sc2gears and choose "Export actions". This will write out textual representation of actions into text files next to the replays (but with .txt extension). Or you can write a plugin which can go through all replays, parse actions (the API parses the actions), and process them, do whatever you want with them.
4) I am not an expert of extracting "missing" data from the SC2 memory why a replay is being watched.

You might also wanna check out S2GS files. These files stores the data you see after a game on the score screen. These might be very useful to you.

These can be gotten semi-automatic. If you read through that thread, you will know how to.
Reply all
Reply to author
Forward
0 new messages