Recursion I believe is best understood by first practicing with small scale examples. Attempt to provide a solution for the following problems before checking the answers provided (Doing otherwise will not help you gain experience on this topic and will defeat the purpose of this post). Continue reading
I intend to lay out the algorithm for a function that returns the next cell to be occupied by an AI in a game of Tic-tac-toe (iteratively). The AI’s difficulty can be divided into 3 levels: easy, medium and difficult.