-3

I am doing research on machine learning, and want to apply an algorithm to training a robot to play a video game. I may want to use Python to implement the agent(controller) so I need a way to take screen shots of the game from python, and send keyboard events from python to the game. My OS is Mac OS X 10.10.

I am new to Python. Is it possible for Python to do so? If so, how to do it? Thanks.

user2261693
  • 405
  • 3
  • 7
  • 11
  • 1
    Stack Overflow is not a code-writing or tutorial service. – MattDMo Oct 22 '15 at 00:16
  • I think your in a bit over your head. try learning a little more about python first. And try looking at other program source code to learn how to make the robot play your game. – J.Clarke Oct 22 '15 at 00:44

1 Answers1

0

I'm not an expert in this field but I think you can look at some of the heuristic search algorithms like Genetic Algorithm (GA).

https://en.wikipedia.org/wiki/Genetic_algorithm

Also, every games are different for instance the super mario vs chess game. I'm not sure what game you are after but GA has been successfully implemented to play Super Mario smartly.

I think for a start you can develop an AI to play the game first, then meantime collect some data for analytics so that it can play better the next time? Again, I dont know what kind of game you are after so it is difficult for me to contribute ideas to help you.

Samuel Toh
  • 18,006
  • 3
  • 24
  • 39