Change max level nesting to 3

Don't get me wrong. 3 levels of nesting are much for me too
but I see nothing bad if one of them is oneliner if cause
Add some tests validating the AI logic and correctness
Add MasterAlgorithm and JuniorAlgorithm logic