FAQSearchEmail

humanlevelartificialintelligence.com   

  
 chapter11

Home | Videos | Contact Us   

 
Home
HLAI
UAI
Videos
Books
Patents
Notes
Donation

     
 

                      

                         << content                                      Chapter 11

6.  Playing videogames

 

Observation of pain and pleasure 

When the robot plays a videogame, the robot’s conscious searches for the objectives and rules of the game.  The videogame was made by a producer and the producer defines the objectives and rules of the game.  One of the jobs of the producer is to guide the player to play the game in a certain way.  He/she has to make sure that the game runs smoothly for the player and the player is having fun. 

The robot has to use intelligent pathways in memory to identify what the objectives of a game are.  In videogames like baseball and football, the objectives and rules are already known to the robot.  Videogames the robot never played before will require the robot to search for the objectives and rules of the game using trial and error and logic. 

For example, let’s use the popular game joust.  If the robot never played joust before and he is playing the game for the first time, how will he know what the objectives and rules of the game are?  He will know by playing the game.  The robot will press buttons on the controller to identify the controls of the game.  In joust, there is only 1 button and a joystick.  The robot presses the button and found out that the button makes the character in the game fly; and the joystick moves the character around in a 2-d environment.

Once the robot understands the controls, it will store this information in the rules container in terms of what actions are possible and how to control these actions. 

Next, the robot will use identification, in terms of pain and pleasure, to understand the objectives and rules of the game.  Pain and pleasure will be the factors to determine what the producers want the player to do and what the producers don’t want the player to do.  The robot will make the character in the game take action.  The robot can make the character fly, collide with enemies, bounce into walls, or land into the lava pit.  Intelligent pathways will choose these actions in a heuristic way. 

The robot will find out that when the enemies touch the character (in the game) on the head, the character will die.  This event will trigger pain because the character lost a life.  When the character lands on a bird’s head, the bird turns into an egg.  The robot is also aware of linear sequences of events.  After the bird turns into an egg, the robot has 5 seconds before the egg turns back into a bird.  The robot also found out, through observation, that if the character touches an egg, the egg disappears. 

Based on logic, the robot will find out that it is a good thing to hit a bird on the head and collect the egg, instead of hitting a bird on the head and not collecting the egg.  By collecting the egg, the character is eliminating an enemy.  Through further observation, the robot will find out that if all enemies are eliminated, then the character passes that level.  The robot also found out that the more levels it passes the higher its points become. 

These trial and error gameplays will determine the objectives and rules of the game joust.  No prior knowledge was ever given to the robot about the game.  Only through trial and error and a form of logic, did the robot find out what the objectives and rules are of the game. 

Games like donkey kong require the robot to use logic to find out the objectives and rules.  Each level has its own objectives and rules.  When I first played the game, I didn’t know what to do.  All I knew is that the controls allow a character in the game to move in a 2-d environment and jump over things.  During my gameplays, I found out that if the character touches a barrel, he will lose a life.  I also learned that if I jumped over the barrels I will not lose a life.  Losing a life is pain and jumping over a barrel means living, so I understood, one of the rules:  “jump over barrels the donkey is throwing at you”. 

From close observation, I see a princess at the top of the building.  Through logic, I concluded that the objective is to reach the princess at the top.   The only way to do that was to go up the stairs and dodge barrels.  When I got to the top of the building and rescued the princess, the videogame said that I past the level.  This passing of the level gives me pleasure and it’s telling me that I had reached one of the objectives of the game. 

In the next level, I encountered a different type of environment.  Donkey kong was at the top of the building and there were ladders placed to allow the character to climb the building.  At first, I thought that I had to climb up the ladders and reach donkey kong.  To my surprise, I found out that I lost a life.  This event caused me pain and I found out that climbing up the ladder to the top of the building isn’t the objective of this level.  Next, I observed that there were pins located at the corners of each level of the building.  I was curious as to what these pins were.  When I touched these pins they disappeared.  I had to also watch out for enemies.  At this point, I logically decided to collect all the pins and to avoid the enemies.  When all pins were collected the building collapsed and donkey kong landed on the ground.  The videogame said I past the level.  This event caused pleasure and it also gave me the objective of the level, which was to collect all the pins and avoid touching any enemies.

Other games like pac-man are very difficult to find the objectives and rules.  Someone has to tell the player what to do.  A simple sentence such as: “your objective is to collect all the dots on the screen”, will be enough to understand the objectives.  Some games for more modern videogame systems are much harder to find their objectives and rules.  

It’s not about the short-term observation of pain and pleasure that determines what the producers what the player to do.  It’s more about the long-term observation of pain and pleasure.  In the case of the super Nintendo game, gradius, when the character receives more powerful weapons, he is less likely to die in the game.  However, if the character receives too much powerful weapons, the videogame will introduce an unbeatable enemy that will rob you of all your weapons.  Thus, just because the character has more powerful weapons don’t mean that it’s beneficial to the character. 

The robot playing the game has to look at the long-term benefits and not the short-term benefits.  Should the character collect 7 out of 10 powerful weapons and keep all 7 weapons or should the character collect 10 out of 10 powerful weapons and lose all 10 weapons? 

The producers of the videogame define how the player should play the game.  If the producers wanted the character in the game to go up a mountain, the screen will automatically move upwards.  The character has no choice but to move upwards.  If the character doesn’t move upwards and touches the bottom of the screen, he will lose a life.  If the character moves upward, he will not lose a life.  Pain and pleasure decides how the player should play the game. 

In another case, the producers don’t want the character in the game to go into the swamp.  If the character jumps into the swamp his life energy will be lowered.  In fact, the longer the character stays in the swamp, the more energy he will lose.  The robot (the player) knows that the event of losing life energy is a bad thing.  This bad thing will give the robot a rule to follow, which is:  “don’t go into the swamps”.

 

Playing the legend of Zelda game

The robot has to manage hierarchical tasks when playing Zelda.  A problem might arise and additional hierarchical tasks are added.  FIG. 62 is a diagram showing how hierarchical tasks are modified.  The original task has 5 encapsulated tasks being managed by the robot to play Zelda.  The modified tasks add in two other encapsulated tasks.  This diagram shows what the task container will look like after playing level2. 

FIG. 62

 

When the robot plays the Zelda game, his goals are to past the game.  In order to past the game he has to determine what he has to do right now, which is to past level2.  In order to past level2, he has to beat level2’s boss and in order to beat level2’s boss, he has to buy the silver sword and go to the caves.

This is the original hierarchical tasks the robot must follow.  During the playing of the game, the robot will run into problems in the game (problem1 and problem2).  The robot must use logic to solve these problems and generate additional tasks and to modify pre-existing tasks.  When the robot is trying to buy a silver sword, he will probably encounter enemies.  He has generated a new task, which is to defeat the enemies that are blocking his path to the shop.  After completing that task, he has encountered a villager who told him that a treasure is located in a pond close-by.  At this point, the robot will generate a new task, which is to find the treasure.  He will go to the pond and bomb the walls as instructed by the villager.  After completing these tasks, the robot will go back to its original task, which is to buy the silver sword (problem1).

After purchasing the silver sword, the robot has to go into the caves.  While the robot is traveling to the caves, he will encounter enemies and new tasks are generated:  to defeat enemies.  When the robot actually gets into the caves, he finds out that the caves are dark and he needs a lamp.  He will not be able to see if there is no lamp.  This prompts the robot to do another task, which is to buy a lamp from the village and go back into the caves (problem2).

Although the robot had 2 interruptions, he was still able to remember his original tasks.  He knows that he must beat the level2 boss; and beat the entire Zelda game.  He also remembered what he did in the past and what he has to currently do.  The human brain is very primitive and it can only remember a limited amount of tasks.  Human beings can forget previously committed tasks. 

Tasks in the task container are modified during runtime.  After the robot passes level2, he has to pass level3 and after passing level3 he has to pass level4.  Logic determines the order of tasks.  Role playing games aren’t as straight forward as most videogames.  The levels aren’t given to the robot automatically.  The robot has to use logic to figure out where the next level might be located.  Sometimes, maps are given and they tell the robot where the next level is, but other times, the character in the game has to talk to villagers and wizards to find out where to go next and what his next mission should be.

When the robot is stuck in the game, he has to use logic to solve the problem.  In fact, when the robot is stuck he has to first identify the problem.  Once the problem is identified, then he can use logic to solve the problem.  The steps to solving the problem aren’t fixed.  The robot might try an action and that action doesn’t solve the problem, so the robot tries another action.  This loop will repeat itself until the robot is successful in solving the problem.

Sometimes, when trying to solve a problem another problem pops up.  Thus, one task can have infinite amount of recursive sub-tasks. It is a fact that the human brain can only remember and manage a limited amount of recursive tasks.   

The key to managing recursive tasks is to remember what the robot was originally doing before.  The robot is doing task1 and he runs into problems, so he adds in 2 new tasks.  After doing the 2 tasks, he remembers that he was doing task1 and continues where he left task1.  During the continuation of task1, the robot runs into another problem.  This time he adds one addition task, called task2.  While the robot is doing task2 he runs into yet another problem and the solving of the problem requires 2 more tasks.  After the 2 tasks are done, the robot remembers that he was doing task2 and he also remembers that he was doing task1.  After completing task2, the robot remembers he was doing task1 and continues where he left task1. 

This is the linear thinking of how the robot does multiple layered tasks simultaneously.  If the recursive tasks go too deep he will forget what his original tasks were or he might skip a previously committed task. 

 

The more the robot plays a game the easier the game will be

When the robot first plays a scene in Zelda, the character might die a few times.  However, the more he plays the same scene the easier the scene becomes; and the more skilled the robot will be in playing the overall game.  The reason why is because, the robot’s brain already stores trial and error pathways related to the scene; and he is aware of any obstacles that are in his path.  He also knows the correct knowledge needed to get itself from one location to the next.  The rules of certain situations are automatically activated.  The tasks needed for a given situation are automatically stored in the task container.   

In the first gameplay of a scene, the robot’s conscious is using a general type of computer program to past the level.  As the robot plays the scene 5-7 times, the robot’s conscious is using a specific and optimal type of computer program to past the level.  The knowledge gathered, the tasks to be done, the rules to follow are all managed by the robot’s conscious.  The repeated playing of the scene will optimize how the computer programs manage knowledge, rules and tasks.  The trial and error helps the conscious to come up with rules to follow or new methods to use for that specific scene.  New ideas on solving problems might activate because of trial and error.  These ideas can be used to solve a problem in the scene. 

 

Using logic to identify tasks  

In the game of Zelda, the robot has to think and use logic to determine its future actions.  A strategy is needed before you can go into a castle (or cave).  The robot must know what its goals are before entering a castle.  A castle is just a big place that has many rooms arranged in a maze like setting. 

Based on my personal experiences, through trial and error, I found many strategies that are useful to past the Zelda game.  I found out that the goals of entering a castle is to:  1.  find the boss and defeat him.  2.  search for the vital item.  These two tasks are a must when it comes to passing Zelda.  The producers of Zelda made the game so that in every castle or cave, there is a boss and there is a hidden vital item.  If the robot doesn’t find the vital item, he will not be able to beat the next level.  So, even though the robot defeated the boss in that castle, he still needs to find the vital item in order to successfully pass the level.            

I personally learned this strategy the hard way.  I was playing Zelda in the past, and in level5 I didn’t get the vital item.  I found level6’s castle, but I couldn’t get in because there was a boulder in front of the castle.  I was stuck and didn’t know what to do.  I found out, through trial and error, that the vital item in level5 is a glove.  The glove is used to break boulders.  From that moment on, I reminded myself that before I go into a castle my tasks are to defeat the boss and to find the vital item. 

This is just one strategy that I found that would help me in beating the game.  Throughout the gameplays, I found many strategies.  These strategies are tagged to the objects involved.  Object association will activate these strategies when the time comes.  For example, when I enter a castle or cave, I will activate the strategy and the two tasks, beat the boss and find the vital item, are stored in the task container automatically.

Other methods can be used to play the game.  The robot has to be aware of the maze and where the rooms are located.  This temporary map of the castle will prevent the robot from doing repeated travels.

Also, the map in the robot’s memory has to remember what each room looked like.  There might be a locked door in one room.  The robot will remember this room and will search for other rooms to find the key.  When the robot finds the key, he can go back to the room with the locked door.  The robot has to have a detailed map of the rooms and where the room with the locked door is and where the robot is currently located.  This map is important because the robot has to plot out a route to get from its current location to the room with the locked door. 

In some complex settings, there might be 4 locked doors and the robot has to find the keys and open all 4 locked doors arbitrarily.  In order to do this, the robot has to remember where the locked doors are.  He also must remember where the robot has traveled so that he doesn’t visit repeated rooms or go around in circles.

In another game called super metroid, the maze is even more complex.  Thankfully, the game provides a map of the environment as well as what areas the robot has visited.  In the game of super metroid, it’s all about getting through unlocked doors.  One door might be locked and a missile is needed to open the door.  In order to get the missile the robot has to defeat a boss.  Other locked doors require a bomb.  In order to get a bomb the robot has to defeat another boss.  Other locked doors are locked and will not open, unless the robot completes a mission. 

The point I’m trying to make is that the robot has to be aware of the entire map and how to get from one location to the next.  He has to remember which areas have locked doors and which have opened doors.  The complexity of the game is managed by the provided map in the game.  However, the robot still has to identify where the hidden doors are in the complex map. 

In some cases, in order to open one door, a series of encapsulated doors must be opened first.  The strategy in super metroid is to remember where the locked doors are and how to reach a locked door.  The ability to remember where the locked doors are and how to reach them is a vital skill in the game.  For example, the red door requires a missile to open.  All doors in the game with the color red will not be able to open without a missile. 

The robot travels in the game.  The blue doors can be opened, but the red doors require a missile and the yellow doors require a bomb.  He opens the blue doors, but skips the red doors.  The robot finds the missile and therefore he can open any red door.  At this point, the robot has to remember where all the red doors are in the map.  He might look at the map, use logic, and say there is one red door here and one red door here and a possible red door here.  Then, he will locate the current position of the character and plot out a route from the current location to one of the locked red doors. 

Unlocking all or most of the red doors is important because there might be items in these locked rooms that can be used to unlock other doors.  For example, a bomb might be located in one of the red doors.  The bomb is needed to open the yellow doors.  Opening the yellow doors might lead to a boss.  By defeating the boss, the unlocked doors with criterias might be unlocked as well.

 

<< content               next chapter >>

 

 

Home | HLAI | UAI | Books | Patents | Notes | Donation

Copyright 2006 (All rights reserved)