Hello guys,
Please forgive me if I look flustered as I am trying to express what is in my mind in words and it may come out a little scrambled. I am writing a special version of tic tac toe to enhance my programming skills, especially in the AI side of things. The grid is 6 by 6. The player must form 5 lines in a row in order to win, same must apply to the opposing team. Right now the game is like 98% complete except when it comes to the AI. I have started writing my very first AI four days ago, I have done lots of bug fixes and debugging and the AI is at it's infancy. Right now it moves randomly and puts it randomly in the board...but it is not a smart AI. It is not smart enough to block my attempt from winning and it is not smart enough to form it's own lines to win and also not tactful enough to form line where it wins even if I attempt to block it in one side. I want to make my AI smart but beatable but at the same time smart enough to beat me. I want the AI to think much like the AI of chess or checker to think when it does it's move.
Can someone help me in this please? How do I make an unpredictable AI but smart enough to make the game fun and challenging but not impossible or not too dumb either. I want the computer to take it's time..think of the best move for it to win and also blocks me from winning, but if it had a choice of winning and blocks me, it goes for winning, but also make a strategical move to attempt to win even if I blocked it from one end but also unpredictable. Like I do not want it to do the same moves again and again...
Remember this is not an average tic tac toe it is a 6 by 6 so it have 36 grids to move about and you need to form five rows to win. CAN SOMEONE HELP ME ON THIS?
THANKS IN ADVANCE!