I have a school project to develop an AI model that plays the Risk board game as optimally as possible. Now, I have made the environment of Risk in Python and I narrowed down my possible machine learning solutions to either a neural network or using a genetic algorithm. I was thinking of using a neural network but I have a question that I can't find the answer to. I also tried searching online on Github and other thesis.

Do I have to create 1 NN to control everything? Or do I have to make one for attacking decisions, one for decisions regarding moving troops etc.?

  • $\begingroup$ Hey, I'm also very much a beginner here so I'm not going to post an answer, but from what I've read/seen, it's up to you - you can have 1 NN control everything (as long as you provide a proper action space), but you can also have multiple agents responsible for different things (which I believe is called "hierarchical RL"). Maybe worth trying just one NN and see if you can get good results with it? If not, try multiple? I saw a vid where one NN was used to determine broad goal/strategy "attack/preserve/defend" and another was used to determine specific actions $\endgroup$ Jun 2 at 18:36
  • $\begingroup$ Thank you for the help, would you be able to link the video for me please? As I think it would be of massive help. $\endgroup$
    – Xibby
    Jun 2 at 18:45
  • 1
    $\begingroup$ Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. $\endgroup$
    – Community Bot
    Jun 2 at 18:59
  • $\begingroup$ It's unclear what you know about AI and ML. How would you train these neural networks? $\endgroup$
    – nbro
    Jun 2 at 20:54
  • $\begingroup$ Here is the video: youtube.com/watch?v=q59wap1ELQ4 $\endgroup$ Jun 3 at 1:10

1 Answer 1


What a fantastic problem! Also, welcome to AI.

The challenge, and it isn't terrible, is that you have to build an NN that can ingest the problem. How do you pose the problem to the learner?

Here is how they setup AlphaGo:
What is the input to AlphaGo's neural network?

There are lots of bad ways to do this, so lets look at things that have to be done to not do it as badly.

The input format must communicate:

  • every country on the map
  • the number and owner of every army on the map
  • the cards in the current players hands
  • the current number of armies for a turn-in

It would also be helpful if it could communicate:

  • the last few moves for all the players
  • something about the connections between countries, how armies move, etc (while it can be inferred, it is a good practice to make the learner figure out the hard parts by feature-engineering the easy parts.

There is a decent open-source MuZero on GitHub. You could spend horsepower defining the game and states, but you would also need to make sure the learner was capable of figuring things out eventually.

  • 1
    $\begingroup$ Thank you for this detailed comment. It helped greatly. $\endgroup$
    – Xibby
    Jun 2 at 22:35
  • $\begingroup$ @Xibby - let me know how it goes. Y'all should have a Github, and push it there. It is the new resume, a track of contributions and engagement in doing cool things. There are very cool people who look there to find people to offer jobs to, very nice jobs. $\endgroup$ Jun 3 at 12:37

Not the answer you're looking for? Browse other questions tagged .