Turn Based AI Algorithm (Small Board, Two Steps) This is my Game Board The Red Balls are the AI Controlled Actors. The Blue Balls are the Player Controlled Actors. The Yellow Cells are the locations, from which the Red Balls can attack. Each Red Ball can do 2 actions move move, move attack, attack attack. At no time there can be 2 minions on one cell, but a minion can arrive on a cell another just left. Its the AI's turn. Its planning the whole turn for all minions, each of them has the two moves. The objective is to maximize the number of melee attacks, which can performed in a single turn (2 actions) on the player balls. Problem I have in my current (brute force) implementation Sometimes it is advisable for a minion to move, although it is already in a melee position, to make space for another minion, which can then move into melee range aswell. Example In this situation its more effective for the front minion to move once, so another minion can move into melee range as well. Do you know an effective algorithm for this job? Thank you for your time!