Gday guys,

i have this idea in my mind for quite a while. I want to teach an AI to play Mario Kart on the NDS, which can hopefully beat me and my friends one day. Iam familiar with the theoretical stuff behind the learning (at least I think so) But iam wondering how to actual train the model in a practical way.

I can capture the pixel data with python and process the image. To get a better understanding of what is going on I can also use 3-4 frames as one state of the environment. This state can be given to the agents which is then taking an action and is getting the reward from the environment. Sounds simple but do I have to pause the emulation for each training step? And how do I check the outcome of the training. To I just feed the game pixels to the algorithm and hope that it will do something?

  • $\begingroup$ "To I just feed the game pixels to the algorithm and hope that it will do something?" Would lead me to believe you've never done this before. I would recommend starting off a bit smaller, this would be quite an endeavour (unless there's already an online tutorial). Do you have any idea of what architecture you'd want to use for this? $\endgroup$ – Recessive Oct 14 '19 at 6:04
  • $\begingroup$ Your are right assuming that I have never done this bevore. My first project so far was to build a simple ANN from scratch without a framework to understand the math behind. But as far as I understand the topic. I need some convolutions to shrink down the feature size. Based on the outcome let the agent take an action and so on. $\endgroup$ – OleVoß Oct 14 '19 at 6:13
  • $\begingroup$ Oh ok, so you do know a bit. Yes you're on the right path using convolutions for an image for sure, but for this particular task it's beyond my knowledge. This does look like something you might be able to apply genetic learning to (here's a good example: youtube.com/watch?v=Ipi40cb_RsI). If you're basing it entirely on an image you might find it to be quite difficult, see if there's some interface that will let you calculate nearest distance to walls and you'll probably have better luck $\endgroup$ – Recessive Oct 14 '19 at 13:13
  • $\begingroup$ I think I figured it out. BUT only if I have understood one key part right. $\endgroup$ – OleVoß Oct 14 '19 at 13:50
  • $\begingroup$ Sry. Posted to early. Given an enciroment. Sth like a gridworld. I know exactly all the states my agent can be in. (Every Tile one State) But in game e.g. MarioKart the statespace is near infinity, since iam using the screenpixels as the current state. Am I right when I think this is not a major problem and let the AI generalize with the convolutions. So it can look at the conv-output and knows more or less what to do? But how do I update the QTable then? $\endgroup$ – OleVoß Oct 14 '19 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.