1

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.?

nbro
  • 39,006
  • 12
  • 98
  • 176
Xibby
  • 13
  • 4
  • 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 – Vladimir Belik Jun 02 '22 at 18:36
  • 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. – Xibby Jun 02 '22 at 18:45
  • 1
    Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jun 02 '22 at 18:59
  • It's unclear what you know about AI and ML. How would you train these neural networks? – nbro Jun 02 '22 at 20:54
  • Here is the video: https://www.youtube.com/watch?v=q59wap1ELQ4 – Vladimir Belik Jun 03 '22 at 01:10

1 Answers1

2

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.

EngrStudent
  • 361
  • 3
  • 12
  • 1
    Thank you for this detailed comment. It helped greatly. – Xibby Jun 02 '22 at 22:35
  • @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. – EngrStudent Jun 03 '22 at 12:37