Small piece of code to test AI algorithms