Thursday, 21 September 2017

Simple beginning to Artificial Intelligence

Let's start the research of Artificial Intelligence with a simple beginning. The ultimate goal of this blog is to write ways to make machines think. Let's try to replicate how humans think.

Let's take examples of noughts and crosses, Chess ( which will be explained in the end) and find the common formula in a series of numbers.

The first thing we have to imagine is the steps to win a game without considering other's moves or to find a formula without thinking about the series of numbers in between beginning and end of a series.
Example.
In noughts and crosses, there is winning possibility in every move if you begin with. So, we can make any move.
In Series of numbers, assume 1, 8, 27, 64 is the series. On first iteration assume 1 and 64 are the only numbers with 2 numbers in between. Let us make a simple assumption that X*16 is the solution. So the series becomes 1, 16, 32 ,64.

The second consideration you have to make is how a move from opponent affects our victory. There are two things we have to consider here. First Remove all options (series of moves) that has become obsolete, because opponent  has made a move, which has stopped our chance of victory. That will reduce our victory set.




Example,
Since the opponent has put a nought in the centre, the possibility of winning in the crossed red line is eliminated.
In series of numbers, take the second number in the series and try to find a common formula for 1,8 and 64. Since we have got 8 as the second number in series, we eliminate possibilities like X*16
The second thing is check opponents plan. Check whether they are getting victory and put a compulsory check.


Example
Since the opponent has put two noughts in a row, you have no option other than putting a cross to check that.
In the series of numbers, we have removed X*16.

Third issue is planning ahead. We have to plan iterations ahead to both to find the obsolete chances and compulsory checks to their victory. The complexity and chances of winning a game increases as we increase the number of iterations.

Example,
In noughts and crosses, if we plan ahead of one or two iterations, victory can be got if no noughts are put in the space marked by red line.
In the series of numbers, we can include next number to calculate the formula in the series.

Coming to chess,
First, you have to plan a series of moves and target for the end victory using very fewer steps, assuming opponent plays exactly as you wish. The complexity of the method increases as we imagine more number of steps to gain victory.
Second, we will reduce our set of moves for victory based on others move, which may eliminate our options in our set. Next, we have to calculate opponents move, that may lead to their victory and check it beforehand.
Third, if we plan iterations ahead, complexity increases as the number of iterations but chances of winning increases on every iteartion.

This is a simple idea which mimics, human thinking. A professional player exactly thinks this way.