Hi! The AI chooses which move to perform based on a series of heuristics. They are calculated based on the full state of the Tetris boar. The evolution algorithm is optimising the weights used to combine those heuristics together. Unfortunately no, the code will not be available!
@@AlanZucconi Cool. What if you try to use the state only for the empty spots in the board? The moves includes rotation? And does it knows the next piece to come?
@@fmaion yes, the AI takes into account rotations. It does not consider certain moves (like the T spin) as valid, but they are not possible in my version of the game anyway. The AI you see here is not considering the next move. This is because otherwise it gets better too quickly and the video would have been fairly boring! But my best AI consistently lasts for several millions moves.