#Coding Project: Risk Auto Set Up

1 messages · Page 1 of 1 (latest)

robust wren
#

Youtube Link:
https://www.youtube.com/watch?v=Z1ZWs7Xk08s

Risk Auto Set Up is a project I've mainly been doing for fun, I noticed when trying to run the same scenario over and over manually setting up the board was quite time consuming so I decided to make a tool to speedup the process. How this work is by calling two files GetMapSetUp.py and SetUpMap.py

GetMapSetUp is a file that takes a screenshot of the game, converts the screenshot into actual information we can use like player order and territory placements. We then take this information and create a list for traversal, this essentially takes any valid position and converts it into a linear path that the computer has to go through to get the exact position. This gives us an exact copy of the map based on turn order and not player, this is mostly because the game does not give us control of player order.

SetUpMap is a file that essentially executes the linear path we already made in GetMapSetUp. It determines the locations of the territories and then clicks on the path in order.

If you take a look into the video you will see the process of me using the tool

Attached to this post is an image showing a comparison of the initial map I used to gather information (left) and the map generated by the tool (right). As you can see all territories have the same value and they all belong to the same player in turn order. For example all of Red's Territory on the left matches Pink's territory on the right.

A possible use case for this tool was maybe in a tournament we wanted to have the exact same map position for all players in a round.

I did play around with the idea of matching the territories based on color instead of turn order although that would require all players having the same number of territories and that is not the case for all maps.

Let me know what you think and any possible tools you would like see made for the community!
I'm excited to see what we can make!

Thanks!

A video demonstrating my Auto Risk Set Up Program.

This program takes the placement of the previous game and replicates it over a manual board setup. Unfortunately the game of Risk does not give us control over player order so players will have different territories but the same order will have the same territory. For example the first player w...

▶ Play video
timid horizon
#

@worn marlin you two need to talk

worn marlin
#

That’s pretty cool! Do you have 6 accounts running on the same computer or something? I’m just wondering how it can select territories for all the players and not just one.

It should be possible to build on top of your code to create a bot that would suggest kill chains and such things automatically. 🙂

mortal grove
robust wren
#

Yeah, at the moment I just have it work on one machine since that all i have but if it's something the community really needs and wants then we can expand our code to work on multiple machines