Nov 06, 2008

UAIcodes

Data is stored in terms of a movie
The computer program stores information in terms of a movie – frame by frame. In a videogame, the movie will include video and audio. Another addition is the controls, it must be included in the movie so that when the AI follows the movie pathway in memory the controls can be used to play the game.

q

In the human level artificial intelligence program the movie will include all 5 senses: sight, sound, touch, taste, and smell.

Storage of the movie in memory is done in terms of breaking up the movie into sections and storing that in memory. The movie sequences are called pathways. The length of pathways is arbitrary because pathways can forget and remember. The more training the pathway goes through the longer the pathway becomes. The less training the pathway goes through the shorter it will become. The storage part of the UAI program will store the most important pathways and forget the least important pathways. It will also self-organize the pathways in terms of commonalities. This means that if one pathway is similar to another pathway then they will be stored in the same area.

The point of the storage is to store unique pathways and use strength to represent that pathway if it ever repeats itself. The storage of data is done in a 3-dimensional format so that the pathways can have properties of a 3-d grid. Data that are similar to each other will be stored in the same location while data that don’t have similar pathways will be stored farther away. The groups will ultimately pull data together because they share common traits.

AI chess program is the key
The AI chess program invented 50 years ago is the foundation for the UAI program. The purpose of the UAI program is to play “any” videogame and past all the levels in the game in the most optimal way possible. The AI chess game is designed as an expert system to play only chess. I simple took this AI chess program and modified it to play videogames.

The idea is to have two players in the game. One player is the AI program and the other player is the opponent. The opponent moves first. Then the AI takes into consideration the opponents move, then based on its calculation of the best possible future, the AI makes a move. The opponent moves again. Then the AI takes into consideration the opponents move, then based on its calculation of the best possible future, the AI makes a move. The opponent moves again. Then the AI takes into consideration the opponents move, then based on its calculation of the best possible future, the AI makes a move. This repeats itself over and over again until the game is over.

Notice that the above example repeats itself in a loop like fashion. The UAI repeats itself in a recursive fashion too.

Basic idea:
AI chess game:
Player makes a move, the opponent makes a move, player recalculates the future steps, player makes a move, the opponent makes a move, player recalculates the future steps, player makes a move, the opponent makes a move, player recalculates the future steps, player makes a move, the opponent makes a move, and so forth until the game is over.

Universal Artificial Intelligent program:
There are two players in the UAI program: the AI program and an opponent (in this case the opponent is the videogame). The AI makes a move, the opponent makes a move, the AI recalculates its future steps, the AI makes a move, the opponent makes a move, then the AI recalculates its future steps, the AI makes a move, the opponent makes a move, then the AI recalculates its future steps, the AI makes a move, the opponent makes a move, and so forth until the UAI program is shut down.

The AI chess game doesn’t store the possibilities of the game in memory it creates the optimal move at runtime. Think of the possible pathways of the chess game like a family tree. Each child node leads to a new pathway. The chess game uses a heuristic search algorithm to find the best next step. Our Universal A.I. program uses the same idea. Below is a section of the possibility tree of a chess game. Any possible move in a chess game will be represented by a new node. Of course we can’t actually display the entire possibility of a chess game because the entire possible tree is 10 to the 40th power. In this chess game the program builds the future pathways during runtime. The future predictions are made during runtime and have a limit to how far into the future it can see.

w

Let’s say the chess game was at node 2 then the future pathways could be:

2, 6, B, H
2, 6, B, G
2, 6, A, I, F
2, 6, A, I, E

The criteria of the chess game will decide which pathway is worth more. When the chess game find out the best future pathway it takes a move in that direction and it re-calculates the game after the opponent takes a move. This will repeat itself over and over again until the game is over. This is the same method we are using in the universal artificial intelligent program. Here is a brief comparison of what my program has with the chess program.

r

t


Here is the pseudo codes for the UAI program:

e

Let’s talk a little bit about the overall idea behind the UAI program. First of all, the codes from the UAI (above) have a loop and the function repeats itself over and over again. At the beginning of the loop the computer takes in 1 frame from the video monitor (remember that I said the pathways are stored like a movie). Once the AI receives the new frame it will attempt to find pathways that best match the entire current pathway and output Rank1. Once the computer has created Rank1 then it will construct the future possible pathways for each pathway in Rank1. Finally, the AI will follow the first ranking pathway in Rank2 because that is the most optimal pathway. Then it goes into the loop and repeats itself from the beginning. In each iteration the AI receives 1 extra frame.

Training of the videogame (knowledge and rules)
In order for the game to be played the AI has to be trained first. The AI will observe an expert game player and store this training in memory. The AI will store the data in memory and take the average of all the information. When enough training is done then the AI program has the necessary knowledge to play the game. It really depends on the expert game player, if the expert game player is the average Joe, it loses some games and wins some games, then the AI program will play the game like the average Joe. If the expert game player is a perfectionist then the AI program will play the game perfectly.

There are so many sequences in a videogame and storing all the possibilities of the game is impossible, this is why the AI program stores the most important things and forgets the least important things. If the AI hasn’t encountered a particular sequence it will take the best match in memory to play the game. The AI will also use “layers” of similar pathways in memory to play the videogame. In addition to the two methods the AI will use a trial and error function to play a sequence that the AI wasn’t trained with. This trial and error function uses pain/pleasure to find the best pathway to follow in memory.

The importance of why we only store the most important pathways and leave out the minor pathways can’t be ignored. The total possibilities of a chess game is 10 to the 40th power and the computer can’t store all the possible outcome in memory. If the computer can’t store all the possibilities of a simple game like chess then what is the chance of storing a game for Atari or Nintendo. Even worse, how can the computer store all the possibilities of complex games like Halo or Prince of Persia for the X-box. The AI will store all the things that was trained by the expert game player and that will be the important pathways stored in memory. The game must use the three methods described in the last paragraph to play the game in the case a certain scene hasn’t been trained in memory. The three methods are:

  1. play the game based on the most similar pathways in memory.
  2. play the game based on “layers” in memory.
  3. play the game based on trial and error where pain/pleasure decides the most appropriate pathways in memory.

The rules of the game are all done by the “intelligence of the expert game player”. If one of the rules is to drive in the center of the road, then train the AI to drive in the center of the road. If another rule is to not hit other cars or objects on the road then drive the car so that you don’t hit other objects on the road. Conflicting rules are also solved by the intelligence of the expert game player. If one rule is to go when there is a green light and another rule is to stop when there is an object in front of the car then what happens if both rules conflict such as the light is green and an object is in front of the car? The expert has to train the AI to go around the object when both rules conflict. The more training the AI goes through the better it will play the video game.

Objective of the UAI program
The UAI program can only follow one given pathway to play the videogame at any time. This means that out of all the possibilities of playing the game there is only “one” pathway it is following at a given time (the optimal pathway). In the UAI pseudo codes the searching of current pathway and the future predictions are the two criterias (there can be more) used to determine the optimal pathway.

Fuzzy logic
The making of the program is sufficient to the point where similar games that have never been trained before can use similar training data to play. For example, if I trained the AI program to play a car game then the AI will be able to play the car game in the most optimal way possible. However, if I have a similar car game I can use the training data to play that game too. In some sense the UAI plays games in terms of fuzzy logic – If it can play a car game then it can also play games similar to the car game.

Storage of data
The storage of information in memory is going to be in a 3-dimensional format. The objects are going to have physical space in a 3-d grid. If we add things to memory then we have to move other objects that are too close, farther away. All objects in memory will have a magnetic pull like how planets have a magnetic pull against other planets. In the case of grouping things, this object magnetic pull is very important. The reason that we have to make the storage this way is because we can’t store data in a linear way. We have to store it in a 3-dimensional way so we can have the properties of 3-d objects in space. Similar data will be grouped together and different data will be stored farther away.

Common traits between data are used to group things together. Memory will self-organize data in a global fashion so searching for information will be quick. Since we are storing pathways then common traits among the pathways will group pathways together. Common traits can range from visual, sound or a combination of visual and sound.

Let’s take one example. The pathway in diagram1 has the same background as the pathway in diagram2. The only difference is the animated object. One is a man and the other is a dog. There commonality is the background. Within memory, both of these pathways will be grouped by their commonalities: C1, C2, C3

e

f

y


Storage in memory will look like this:

q

Retrieving data
Retrieving information will be done by multiple search points. These search points will communicate with each other during the search process. This will allow the searching to happen in a global fashion and repeated searches won’t occur. Another benefit to multiple search points is that we can get the data very fast.

w

During the search process the computer will break up the current pathway (the pathway the AI is looking for) into “pieces” and randomly pick out search points in memory. The search points will communicate with each other on their findings and what are the most likely areas to search. The more matches a search area has the more search points will be devoted in that area. This will happen over and over again until the current pathway is found or the closest matches in memory have been found.


[note: The human level artificial intelligence program inherits everything from the universal artificial intelligence program. The pathways will be different because the videogame has only sound and video. On the other hand the HLAI has 5 senses: sight sound, taste, touch, and smell. All of this will be stored in the pathways and the pathways will be stored in memory. As more senses are added into the pathways the more desire for disk space is needed.]

theme by danny | icons by cameron | powered by tumblr

< Sound Axis >Random_Signs