oyachai / HearthSim

Generic Hearthstone game simulator
MIT License
314 stars 59 forks source link

Human Readable Game History #32

Open Kallin opened 9 years ago

Kallin commented 9 years ago

Have you given any thought to producing a game history that would be easily understood by humans? I know there is the GameDetailedRecord, but it's not easily digested. It would be great to have something similar to what you see along the side while you're playing hearthstone.

IE.,

Player 1 turn: plays card x to position 0 position 1 minion attacks enemy hero

Player 2 turn: uses hero ability against enemy minion 0.

etc.

I think this would be really useful for debugging AI decisions. Once we get more of the cards implemented I'm interested in trying to create a really great AI, and I think creating a format that allowed us to easily watch what the AI's do would help a lot.

What's missing are descriptions of the edges between boardmodels in the record.

Any thoughts?

oyachai commented 9 years ago

That would definitely be useful. The HearthAction class was originally intended for just that purpose. I think all that remains to be done is to have the BoardStateFactoryBase class record all the actions (though there is some trickiness involved in treating the battlecries). I'll work on finishing up that implementation next.

MrHen commented 9 years ago

I have fixed up the HearthAction and HearthActionBoardPair tracking so that the games generated by the simulator can be repeated through just the list of actions. The relevant branch is here for now: https://github.com/MrHen/HearthSim/tree/game_history. I am planning on merging it back into my master shortly. (Hopefully tomorrow.)

The next step would be creating an appropriate toString on the HearthAction class and then adding the output to whatever log is relevant.

One caveat to this is that I haven't yet supported StopNodes so... no CardDraw or RNG in the action chain yet.