Statistics hooks!

Hey all,

I lost my weekend to this - gladly - and found myself wanting to apply machine-learning and genetic methods to developing new factory layouts. As I envisioned it, this would treat the game more as a simulation engine than a GUI program - it takes a savegame defining a full factory or subsection of a factory, runs it, and spits out a state trace - what resources and modules are where, what resource requests are mapped to which importers, service times for service requests, throughput for any given slot and importer broken down by resource, time a slot spends starved for a given resource, time a given resource or subassembly spends between any two points… on and on and on.

Obviously this isn’t something we can ask of the devs. There’s an infinity of analytic we can apply to any given design.

Practical variations on the above, though:

  • Dumping the full game state to a socket or file every engine frame
  • Dumping a selected subset of the game state to a socket or file every engine frame
  • Dumping all money, request, movement, or completion updates for that engine frame (or a subset)
  • The above two, but exporting total throughputs or selected vars only a couple times a second
  • Exposing an API for running in-game scripts against the game state, for export or in-game display
  • An in-game item to measure what assemblies or resources pass a conveyor or resource conveyor tile
    • this might be used to select the game state to export for above

EDIT 1: events

?? helpful:
https://youtu.be/G94-x1WcUlQ?t=1m48s