About Zombie Game Project:

This site is a blog about a programming project I have been doing over the last two years. The project is to recreate the boardgame Zombicide[2] based on the combining the core rules from the base game and the night rules and game clock. that are used in the expansion sets.

Why? To understand this, it is important to know what the game Zombicide is.

About Zombicide (The real game)

Zombicide is a “real” table top board game when (usually) six survivor characters go around a city carrying out tasks as a team to complete a mission. During a game, each survivor has three moves. They can do whatever they want and in whatever order they want – move, fight, search, open doors, open weapon creates, collect mission objectives or whatever else they may be able to do.

Each survivors takes turns to do their actions – the Zombie round beings. Any Zombies present on the board can move or attack. Afterwards new zombies come in to the game from spawn points.

As the game progresses and the survivors get more experience points – more and more Zombies spawn into the game.

There is always a bit of luck – as fighting the zombies involves rolling dice.

Hopefully the survivors will have enough weapons (and lucky dice) to fight of the hoard. If one of the characters dies in the game, the game is over and everybody looses. That cycles until either the mission objectives are achieved or a suvivors is dead. Don’t worry, it’s only a game – you can start again or just “cheat” and carry on 😉

So why write Zombicied as a Python project?

Generally in classical programming, logic can decided using IF – THEN – ELSE conditions and statements. This provides a set of rules or decisions to deal with.
These direct what the program does and call / executes code to control the program.

We can represent “rules” using a bullet list without even programming. You don’t have to be a programmer to understand this:

Things “TO DO” depending on the day of the week

  • Saturday : Shopping
  • Sunday : Stay in bed
  • Monday-Friday: go to work, or college, take the kids to school

Programmers would use IF / ELSE as “bullets” and THEN as the colon.

  • IF Saturday THEN Get up and go shopping
  • ELSE IF SUNDAY THEN Stay in bed till lunchtime
  • ELSE (Monday – Friday) THEN go to work, or college, take the kids to school

That’s pretty simple, but as you can see that last statement with ELSE that represents what to do on a weekday had some additional logic or complications. In programming it is possible to additional logic for that case by “nesting” them inside like sub bullets.

  • Saturday : Shopping
  • Sunday : Stay in bed
  • Monday-Friday:
    • Has a job : go to work
    • At school: goto college
    • take the kids to school

It can get complicated. What about if it is school holiday, and you need to go to work, but don’t need to take the kids to school. Or you don’t stay in bed on Sunday and go to church. Or you shop on Friday evenings and play football on Saturday mornining.

Lots of rules, conditions and logic in life too.

Machine Learning as an alternative to classical programming

My idea is that it is difficult to keep track of “lots” the logic with condition-based rules and they are too complex when nested three deep. An alternative would be to play the game, gather the state of the game after each successful move and use a machine learning algorithm to predict the next best move based on all my previous moves. If it worked, it would be possbile to automated some of the survivors and let the computer play them. Anyway that is my project and it has lots of interesting sub-projects.

Here are problems to solve along the way:

  • Learn Python
  • Write a GUI script/program to create zombicide maps and missions
  • Write a GUI script/program to play the missions
  • Write classes for the all the survivors, zombie types, blue cards, red cards, spawning cards and grey cards (cars options)
  • Write classes for the survivors special skills. I have only 16 survivors cards.
  • Write functions to control game flow and movement rules
  • Animate the zombie spawns and movements
  • Save the data for a ML project.
  • Import and parse the game data into Pandas and Numpy Arrays


I don’t know how much data I would need to predict a reliable move. While playing the real board Zombicide game, I wrote down some factors that would affect what move I would make.

Here are a few of them:

  • How many Zombies will move on my tile at the end of the round?
  • How far are Zombies of each type?
  • If a spawn cause an activation – how many Zombies will move on my tile at the end of the round
  • If a spawn cause an activation – how many Zombies will attack on my tile at the end of the round
  • How many moves do I have?
  • Can a weapon held in either hand kill that Zombie?
  • If not, do I have a weapon in my backpack?
  • If I search for a bluecard and spawn a zombie – could I kill beforehand?
  • Are other players on my tile?
  • What other players could help me on my tile?
  • What XP level is the highest player?
  • Is it day or night?
  • Can I open are door?
  • Are all the mission objectives achieved?

To be able to

Can I download or get the code for your project game?

No, because the game, rules and graphics are “intellectual” property from CMON. You can download the rules of all their games from their website in PDF form -so the rules are not secret. ChatGTP also aware of the game and knows the rules. Some of the graphics that I used are from available their MapBuilder kit – which is also free to download.

Apart from there are some bugs and not quite finshed parts still to program. It also contains some of my first Python code and the internet doesn’t need to see that – you know that beginners way of how NOT to test for array length in python? That is in still some functions.

if len(array) >= 1:
    do_something()

This project has three Python scripts:

zombizied_mapbuilder.py :A mission builder script to place tiles to make maps, set survivor starting points, spawns and game exit points and set objectives.

zombizied_gui.py : The game script- to play the missions (and test the code).

zombizie_preprocessor.py : An AI Collector component to gather the game events (players actions +game state data) for my machine learning projects. The data for all the moves in each mission is saved in csv file. Only moves are saved if the survivor is still alive after the move.

I programmed it using Tk.inter GUI module on a Raspberry PI4. Is hasn’t been tested on PC / Mac. It probably would work though. Tk.Inter is not really designed games and on a Raspberry PI is only single threaded. The is a lot going on on the screen – it is a bit slow. Get the real board game – it more fun.

Zombie Game running on Raspberry Pi 4 with HP screen (1080p) and second touch screen. The touch screen has a zombicide image as desktop background.

Anyway, the main fun in Zombicide is sitting together with your friends or family at the table with a bowl ful of snacks for an evening of fun. The last thing the internet needs is another game where you sit alone and play alone.

Buy the real game on Amazon or your local game shop and enjoy it!

Real Zombicide [2.Edition] and Fort Hendrix Expansion. Dice tray and a bag of crisps!