I am currently attempting to create an AI which can play games, but learns to pl
ID: 659153 • Letter: I
Question
I am currently attempting to create an AI which can play games, but learns to play rather than using hard-coded instructions. But, this isn't my problem, my problem is telling the AI whether it has lost, whether it won, where to move the mouse/what key to hit, what just happened in the game etc.
I'm using C++ (though I've seen tutorials on bots that play flash games in python), and my OS is Linux (Ubuntu). This is a personal project, so it doesn't need to be cross-platform, but it would be helpful.
Explanation / Answer
This depends on the game and its specific implementation. If the game provides a programming interface for "bots", use that. If you are the author of the game or have the source code available, provide such an interface. You may consider to learn some bits about interprocess communication, specficially on Linux, first. If you are thinking about controlling arbitrary third-party games, you need to "simulate a user", using "screen scraping" techniques like the ones described in the article you linked to. The more complex the game, the more this might be an AI project on its own.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.