Planning the AI


Last week in my game Design II course, we were given a new project with the goal of designing an AI for the player to interact with in Unreal Engine. I have worked with AI in unreal engine before, but they were rather simple and could not learn to become better at their job. This is common practice for most games, but I have been interested in more complex AI that utilize processes such as Reinforcement Learning and the Genetic Algorithm to create an AI that can improve upon itself. I decided to create an AI that would compete with the player in Tetris, and have spent the past week coding a Tetris clone in Unreal Engine to prepare. This tetris clone can have multiple instances running so one is being controlled by the player and the other is controlled by the AI. Throughout this process, I have been doing research on how to build an AI that can do this. My original plan was to use reinforcement learning through the MindMaker plugin for Unreal Engine, but others who have tried it found it to be overly complicated and unnecessary for the use case of playing Tetris. I have decided to go with an AI that uses weighted variables to control what conditions it prioritizes when it makes a move and use a Genetic Algorithm to optimize these variables. The variables I will use to start with include Holes, Bumpiness, and Line Clearing. Holes tells the AI how willing it is to make a move that results in open space below the piece. Bumpiness tells the AI how willing it is to move the shape to a position where it will stick far above the neighboring pieces. Line clearing tells the AI how much it cares about clearing lines.

Get Tetris AI

Leave a comment

Log in with itch.io to leave a comment.