Tetris-evo is a project mainly written in Ruby, it's free.
An evolutionary approach to solve Tetris
An evolutionary approach to solve the Tetris problem.
Requires https://github.com/eteubert/tetris-api