Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Not Alone Board Game Simulations

Yi Sheng
February 28, 2018

Not Alone Board Game Simulations

On the programming of board game simulations, the journey and challenges.

Yi Sheng

February 28, 2018
Tweet

Other Decks in Programming

Transcript

  1. Me 1. Interests include board games and game design 2.

    Python projects/interests include 1. Dataviz - bokeh 2. Webdev - django 3. GUI app dev – PyQt / Tkinter 4. Webscraping – Scrapy 5. Image recognition – pytesseract 6. Machine Learning – scikit-learn 3. ~2 years working with python
  2. Content 1. Motivation for project 2. Not Alone primer 3.

    Separation of game rules and decision making 4. Logging handlers 5. Identifying and fixing bugs 6. Counting game stats 7. Impact of various strategies on win % 8. Code Walkthrough 9. Questions
  3. Not Alone - The Game 1. 2 – 7 players,

    1 Creature, the others are Hunted 2. Each team tries to reach a set point on the scoreboard 3. Basic game flow 1. Hunted plays Place cards face down 2. Creature targets one or two of the Place cards 3. Hunted reveal Place cards 4. Getting by the Creature advances the Creature’s score 5. Those not caught get to activate the Place’s effect 6. Repeat until one side wins
  4. Separation of game rules and decision making 1. The game(object)

    has players(objects) and a scripted flow which gives each player windows for performing their actions 2. Player objects have mind objects, which make decisions on each action 3. The mind makes decisions by accessing game variables via the player.game 4. Analysis of different strategies
  5. Logging handlers 1. logging module 2. One stream handler for

    showing me errors, warnings 3. One file handler for saving full game logs, which help in debugging
  6. Identifying and fixing bugs 1. Need game IDs to find

    games in thousands of game logs 2. subprocess.check_output() to check last row of csv, in order to give IDs to new games 3. Include game ID in the error log
  7. Impact of various strategies on win % 1. Different mind

    objects on different players 2. BetterMind inherits from RandomMind and overrides methods for certain decisions to make better(?) choices
  8. WIP / Directions 1. Simulation of player sentiments 1. Players

    would have variables representing game satisfaction, excitement, tension, boredom 2. Data visualisation of results