Statistics project?

alpaca

King of Ungulates
Joined
Aug 3, 2006
Messages
2,322
Is anyone interested in gathering some gameplay statistics we can access? Presumably 2K gathers these for themselves, but it would be interesting to have a treasure trove of data available to run analyses on (big data style). My main idea currently is to enable the history log. To do this, you have to edit

Code:
C:\Users\alpaca\Documents\My Games\Sid Meier's Civilization VI\UserOptions.txt

(replace alpaca with your user name) and change the following setting

Code:
;Game history logging level, 0 = off
GameHistoryLogLevel 1

from 0 to 1. Now, when you start a new game, you will get a file called GameCoreHistory1.xml in the Logs folder with contents such as these:

Code:
<Turn id="7">
                <Event id="1550" tech="TECH_MINING" message="Research Changed"/>
                <Event id="1551" message="Treasury Changed"/>
                <Event id="1552" civic="CIVIC_CODE_OF_LAWS" message="Civic Changed"/>
                <Event id="1615" tech="TECH_WRITING" progress="0" source="trigger" message="Tech Boost Triggered"/>
                <Event id="1616" tech="TECH_WRITING" message="Research Changed"/>
            </Turn>
            <Stat type="Cities" value="1"/>
            <Stat type="Population" value="1"/>
            <Stat type="Techs" value="0"/>
            <Stat type="Land Units" value="1"/>
            <Stat type="Units in a Corp" value="0"/>
            <Stat type="Units in a Army" value="0"/>
            <Stat type="Naval Units" value="0"/>
            <Stat type="Tiles Owned" value="7"/>
            <Stat type="Tiles Improved" value="0"/>
            <Stat type="Gold Balance" value="41"/>
            <Stat type="Faith Balance" value="0"/>
            <Stat type="Science Yield" value="2"/>
            <Stat type="Culture Yield" value="1"/>
            <Stat type="Gold Yield" value="5"/>
            <Stat type="Faith Yield" value="0"/>
            <Stat type="Food" value="4"/>
            <Stat type="Production" value="6"/>
            <Stat type="Tile Yields" value="8"/>
            <Stat type="Building Yields" value="10"/>
            <Stat type="District Yields" value="0"/>
            <Stat type="Population Yields" value="0"/>
            <Stat type="Outgoing Trade Route Yields" value="0"/>
            <Stat type="Score" value="6"/>
Which is basically the same info that you get in the end of game overview, and then some (you also get this info for your enemies, so you can use it for cheating if you like).

I would hazard a guess that this will not be a legal MP setting, but haven't tested it. There is also another option
Code:
;Sequential Game history logging level, 0 = off
GameHistorySequentialLogLevel 1
which will create a different history file with even more information containing such things as unit moves and city founding, but is even huger. Most of this information is probably also in the savegame, but I don't really feel like reverse engineering the savegame format.

If enough people would be willing to participate, I would at some point create some tools to allow us to analyze this data and perhaps enter it into a common database so that we can gather valuable information about how peoples' games progress over time. You wouldn't have to do much (unless you want to, of course), just collect the history information and upload it somewhere once you're done with a game. Please post an answer if you'd be willing to help.
 
I think this is really cool. If there was a way to apply machine learning to it, it could be used to develop better AI algorithms. Is this just a file at the end of the game? Thanks.
 
I think this is really cool. If there was a way to apply machine learning to it, it could be used to develop better AI algorithms. Is this just a file at the end of the game? Thanks.
No, it's written to every turn and at the end of the game contains info for every turn in a timeline-like sort of way.
 
InfoAddict for Civ6? I would definitely use it.
 
I think you are into something great here. This dataset can be a treasure trove for both AI research and behavioral (i.e., human players) game theory research. I also see commercial value from this, since game theoretic behavioral data is an under studied area of 'big data'. Think DeepMind and AlphaGo. Civ is both simpler and more complicated than Go.

If you decide to do this, a couple suggestions:

1. Develop a 'tool' that people can install, but they must agree to share data in exchange.
2. Try to publish at least part of the results/insights and try to make a connection to AI design.
3. Open source the data for the AI/game theory academic community but of course you should ask for citations.

This can be really fun. If you decide to do it, I will be a first volunteer.
 
count me in! let me know when you're ready to start...
 
machine learning being the core of my work , I'd be happy to participate into getting a rich dataset to couple to difficulty level and type of victories. Not sure it is rich enough to get any AI improvement but hey , let's try it out.
 
machine learning being the core of my work , I'd be happy to participate into getting a rich dataset to couple to difficulty level and type of victories. Not sure it is rich enough to get any AI improvement but hey , let's try it out.
I don't know, the sequential (2nd type) log file is pretty detailed, you can pretty much see anything players do. It should definitely be possible to train an AI model with the data if you put it into a suitable format. Even the condensed first log has a lot of info such as research paths, building prioritization, etc. that should definitely be useful for AI work. With no ETA on modding tools, I'm not holding my breath, though. For Civ5, it took so long to get the SDK that most people weren't even interested in modding it anymore.

For me, it's more about leaderboard-like stuff such as comparing how you're doing with others and about getting statistical information for theory-crafting, anyways.
 
Top Bottom