Hi Ben,
This is my favorite type of bug reports ;) I really appreciate the effort researchers like you and your group are putting to validate our libraries! Please do let us know when you publish your work.
As for the bugs:
1. You are right. It's not necessary. However, like in this case, we sometimes prioritize clarity in examples over minuscule optimizations.
2. The entire game_state object is 8 bytes. That's why we are just persisting the entire thing instead of individual fields. It would make no difference.
3. Yup, good fine. That persist is redundant.
4. Again, this was likely made for clarity. However, in this case, I can imagine this actually making a non-insignificant performance different. I'll make that change ;)
5. This code is not thread-safe. The word "atomic" refers to the fact that this example uses the "atomic API" from libpmemobj. Sorry about that - I can see how this can be confusing.
Who should I say this is Reported-by?
Hope this helps,
Piotr