<< content
Chapter 4
Managing multiple tasks simultaneously
When the robot drives a car, he is actually doing
multiple tasks simultaneously. One task is driving in the middle of the 2
white lines. Another task is to follow traffic laws such as avoiding other
cars on the road. Yet another task is to observe any traffic signs and obey
them. If a traffic sign says 30 mph, then that means the robot has to drive
less than 30 mph. Yet another task is to look out for sirens such as a
police siren or an ambulance siren. Most of these driving rules will be
stored in the rules container in terms of if-then statements. If you
recognize a police siren, pull over to the side of the road. If you
recognize an ambulance siren, pull to the side of the road and let it past
you. The conscious of the robot will manage all these driving rules and to
alert the robot when a rule has been violated.
Sometimes conflicting rules and rule interruptions are
solved through logic. The solving of conflicting rules
are done by intelligent pathways in memory. Teachers teach the robot
how to solve conflicts when it happens.
Yet another task for the robot is to plan routes to get
to its destination location. Intelligent pathways will be used in memory to
search for its current location and maps and fabricated maps will be
activated to instruct the robot in what roads to drive in to reach the
destination location.
The computer program in the robot’s conscious will
activate a previously learned map of the environment. This map can be a
very general elementary map of the environment. The computer program will
mark where the car is currently located and it will mark where the car is
going. Then, the computer program will draw sequence of lines to get from
the current location to the destination location. The output of the
computer program in the conscious will be a sequence of streets that the
robot has to drive through to get to its destination location.
When downloading multiple files online, the server will
send packets for each file equally. For example, if it takes 1 hour to
download a 5 minute video and the user wants to download two 5 minute
videos, the downloading will take two hours. Both video will be completely
downloaded after 2 hours. Managing multiple tasks for a human robot works
the same way.
The robot’s attention can only be devoted to one task
at a given time. If the conscious has to manage 2 tasks, it has to work on
task1, stop task1, work on task2, stop task2, work on task1, stop task1,
work on task2, stop task2 and so forth. The attention of the robot’s
conscious can only focus on one task at any given time. If the robot was
driving a car, he has to manage multiple tasks simultaneously. The computer
program of the conscious will be the engine that will switch between tasks.
It will drive the car between the white lines, then it will observe the
environment for any signs, then it will drive the car between the white
lines, then it will observe the environment for any signs and so forth.
However, driving a car will require lots of
simultaneous tasks. Sometimes people can drive on the road, eat breakfast
and talk on a cellphone at the same time. Each
additional task will put more strain on the robot’s focus.
Multiple tasks for videogames
When playing a game like space harrier for the Sega
genesis, the player has to manage multiple layered tasks. Space harrier is
a first person shooting game and the character is flying in the air and he
has to shoot space aliens. My approach to playing the game is to avoid any
objects that come close to the character and to shoot as many space aliens
as possible. The more space aliens I destroy, the more points I receive.
Higher points would mean that I can earn extra life.
The two tasks for Space harrier are considered layered
tasks because they are happening simultaneously. In fact, the conscious has
to do more than two tasks at the same time. The character has to shoot
specific types of enemies in order to receive powerups.
Thus, in addition to avoiding objects and shooting space aliens, the robot
has to also destroy specific enemies to get powerups.
Tasks are managed by the decision making of the robot
at that moment. If the robot wants to get powerup,
then it will go after specific enemies. Under certain circumstances, the
robot might be tired and doesn’t want to past the level, so he might skip
the powerup. The robot might be playing the
game for fun and he might deliberately hit an object. Thus, decision making
is not just based on intelligent pathways in memory, but based on other
factors such as emotions, mood, goals and so forth.
Complex rules can also play a factor in decision
making. If the player has too many powerups,
the CPU of the videogame will automatically send an undefeated enemy to rob
the player of all powerups. This rule basically
prevents the player from getting too much powerups.
The robot has to decide wither it wants to have 5
powerups and keep all 5 powerup or have
10 powerups and lose all 10
powerups. The robot will most likely pick the first choice.
Teachers will teach the robot how to manage multiple
tasks. Do task1 first, stop, do task2, stop, continue on task1, stop,
continue on task2, stop, continue on task1, stop, continue on task2, etc,
etc. After switching back and forth, the robot has to make sure that it
continues on the tasks until both tasks are completed.
Sometimes the robot can give priority to tasks. The
robot can do task1 for 5 minutes, then do task2 for 1 minute, then do task3
for 2 minutes. In this case, task1 has high priority so the robot spends
more time on it, while task2 has low priority so only 1 minute is devoted to
that task (for each iteration).
Managing many tasks simultaneously is very difficult
for human robots because the conscious is only aware of one thing at a given
time. Human beings were taught to write things down or have a scheduler
that manages multiple tasks. In a fast food restaurant, if a customer wants
to order 10 items, the clerk has to punch out the order into a computer so
that he can process the order himself or let others process the order (or
both). During the order process, the clerk can check to make sure all of
the items are processed.
People who work in a manufacture
plant has to use computers or notebooks in order to manage multiple tasks.
If you think about the robot’s brain and
its conscious, intelligent pathways create a
database system because the pathways can store data in a meaningful way and
retrieve data in a meaningful way. The intelligent pathways can also create
an operating system to manage multiple threads of tasks.
Examples of logical functions inside the conscious
Intelligent pathways in memory are structured in a
hierarchical manner and are created by lessons taught in school. In some
respects the data sensed from the environment has little concern in terms of
the robot’s decision making. The robot forms the conscious so that it can
control its decision making regardless of the environment it is in. For
example, if the robot was in a baseball game, he will not automatically play
in the game. He might be an observer or a bystander who happens to past a
baseball field. The goals and the roles of the robot is based on its
decision making at a given time period.
The robot controls the situation. If the robot was at
the baseball field as a player, then the robot’s conscious will have the
necessary knowledge to play baseball. If the robot was at the baseball
field to observe the game, then the robot’s conscious will tell itself what
to do. In this case, the robot has to sit on the stands and watch the
game.
Thus, based on the robot’s decision making and its
goals, it will take action; and not based on the current environment. In
some respects the 5 sense data from the current environment is considered
less important than the robot’s goals.
This is the whole point about building a robot that has
human level artificial intelligence. The robot is aware that it’s alive and
it controls its own actions in a dynamic environment.
The next couple of examples will illustrate the logical
functions that are executed inside the conscious. As stated before, inside
the conscious there is a series of “computer programs” that extract data
from memory, process the data, and control the actions of the robot. The
intelligent pathways create these computer programs. As the robot
encounters the environment, in each iteration, it
will select an optimal pathway from memory. This optimal pathway is the
best pathway to follow to take action in the current environment. As the
robot encounters the environment, the intelligent pathways create the
necessary logical functions to process data and to instruct the robot to act
intelligently in the future.
Some of the logical functions inside the conscious are
extremely simple. They take specific data from the current environment and
use simple discrete math functions to process the data. The remarkable
thing is that the conscious (via intelligent pathways) extract very little
data from the overwhelming sea of information from the environment and use
this information to do logical thinking.
FIG. 14A-B are examples from
the game space harrier. Should the character move to the top where there
are lots of enemies to shoot or should the character move to the bottom
where there are less enemies to shoot? The
decision making is based on many other factors. For one thing, if I kill
lots of enemies, I will have higher points and higher points mean that I can
earn an extra life. However, there are rules based on this situation. When
you encounter a lot of enemies, there is a high probability of getting hurt
which causes lower life energy. When your life energy reaches 0 the player
will lose a life (or game over).
The player has a choice to make in this situation. If
the player’s life energy is high and the player wants to beat the game, then
go to the top and kill as much enemies as possible. On the other hand, if
the player’s life energy is low and the player wants to beat the game, then
go to the bottom and destroy those enemies instead.
FIG. 14A
FIG. 14B
The 5 sense data coming into the robot every
millisecond is overwhelming, but it is able to only extract the logical
thoughts in FIG. 14A-B. It limited the overwhelming data from the
environment to only a few elements. The decision making was based on a
simple type of interconnected if-then statements.
In some ways it’s not as simple as the diagram in FIG.
14A-B. There should be many factors involved in decision making (refer to
previous books). The factor of determining how badly the robot wants to
beat the game is important -- is he beating the game with high priority,
medium priority or low priority. If he was in a contest, he would have the
highest priority in terms of beating the game. If he was at home playing
for fun, he would have low priority in terms of beating the game.
Another factor is the life meter. How does the robot
determine what is low, medium or high? Many years of playing a videogame
will determine this. The current game may not have the same standards as
other videogames. The computer program inside the robot’s conscious has to
decide what is low, medium and high for this videogame.
As stated before, there are two types of conscious:
open activation and hidden activation. The if-then statements might be
considered open activation (solid circles) and the life meter and goal
priority might be considered hidden activation (dotted circles). The robot
is aware of the open activations, but isn’t aware of the hidden
activations.
The example in FIG. 14A-B is just one illustration for
the space harrier situation. The goal might have 30 different variables.
For example, the goal can be: play for fun, play poorly, play to laugh,
play to lose and so forth. Teachers will teach the robot under numerous
situations. The robot can also learn to teach itself how to make decisions
through trial and error.
Layered tasks
When the robot is playing a given videogame, there are
computer programs in the conscious that generate decision making and
determine what actions to take. The conscious generates a computer program
for each layered task. The robot might play a driving game and he might
have 4-5 tasks that he is juggling simultaneously. One task is to drive
between the 2 white lines; another task is to watch out for road signs;
another task is to follow traffic laws; and another task is to avoid other
cars or objects.
Each task can be static or linear. If the task is
linear then the computer program will repeat itself over and over again.
Driving between the white lines is a task that is continuous because the
robot is always following this task. Following traffic lights is a linear
(or repeated linear) task. The robot will stop the car on the traffic line,
wait for the traffic light to turn green, and drive the car forward. Once
the traffic light is past, the robot can stop the task and wait for another
traffic light before executing the same task.
Each task is given a computer program and all computer
programs inside the conscious have to work together in terms of changing the
tasks and rules. All computer programs in the conscious have to be
compatible with each other. In terms of decision making, how the robot’s
conscious manages multiple tasks is the actual decision making process. All
layered tasks are managed and controlled in a linear fashion -- which tasks
goes first, second, concurrently and so forth. The decision making process
is actually the managing of multiple tasks in the task container. The
conscious will delete, add or modify tasks in the task container as time
passes.
Some layered tasks are complex, for example, a game
like gradius for the super Nintendo, require
players to manage powerups. The
powerup meter has 6 levels and each level has a
different powerup. For example, the first
powerup is speed. When the player collects one
powerup the first powerup
meter will light up. If the player presses the C button the player will
have faster speed. The 5th powerup
level is the laser. If the player collects 5 powerups,
the 5th level powerup level will
light up. If the player presses the C button the player will have a laser
weapon. The task of managing the powerup meter
is done through a computer program in the conscious. This layered task has
to interact with other layered tasks so that the robot can make decisions
that benefit the videogame.
While the robot is trying to manage the task of the
powerup meter, it has to also avoid any enemies
or objects. The decision to pick a powerup
level will depend on what environment the robot is in. If the robot is
playing in the lava level, he needs the forcefield
in order to pass the level. If the robot is playing in the forest level, he
needs the laser weapon to destroy enemies easily. Thus, one layered task
has to interact with other layered tasks in order for the robot to make a
decision.
How does the robot actually play an unknown videogame?
What if the robot doesn’t know how to play a videogame
or what the objectives are or the rules are? The lessons in school of
finding out what the objectives are and rules are will activate in the
robot’s mind. Things like: try pressing the buttons randomly to find out
what the controls are or try something in the game to see what happens.
Based on what happens, the robot can formulate what the character in the
game has to do and what the rules are.
However, prior knowledge about videogames and what type
of game it is will tell the robot what are the probable objectives and rules
are. For example, if the robot was playing contra for the Nintendo, he will
know by the first 5 seconds that this game is a side-scrolling action game.
Side-scrolling games require that the player move forward and reach the end
of the level. At the end of the level there will most likely be a boss
waiting for the player.
While these general knowledge pop up in the robot’s
mind to play unknown videogames, basic type of trial and error functions are
executed. Videogames can be played in terms of pain and pleasure. If the
robot (player) is killed, the event will cause pain for the robot. If the
robot passes a level or does something good in the game, then the event will
cause pleasure.
Through trial and error, the robot learned many basic
good or bad behaviors. If the character in the game has low life energy,
that is pain. If the character is hit, that is pain. If the character
loses a life, that is pain. If the character beats a boss, that is
pleasure. If the character saves the princess, that is pleasure. Thus,
intelligent pathways to identify wither an event in the game is bad or good,
can be used to play an unknown game. Through trial and error, the robot
will know what is good and what is bad in the game. Most likely the
objectives and rules of a game are found through trial and error.
Identification of events for a videogame
are learned from teachers (or through
self-playing).
General types of identifications of events in a
videogame include the knowledge:
1. do not touch enemies.
2. jump on the edge of the
platform.
3. jump over bullets.
4. if an enemy have
flashing colors, that means he is hurt.
5. aim for the bosses’
head.
6. the game will tell you
when a level is completed.
7. the character’s life
meter is somewhere on the screen.
8. the points of the game
is usually at the top of the screen.
9. the life energy of the
character is usually located at the top of the screen.
10. press the start button
for additional information such as maps and items.
These are general facts related to all videogames. If
you play any Nintendo game, you will find that all 10 facts listed above
apply. Most of these rules are found by reading instruction manuals or
videogame magazines. The robot might observe multiple videogames and come
up with the knowledge that most games have a life
energy at the top of the screen; or that when the life energy is gone the
character loses a life.
These facts can also be learned by teachers. A teacher
can teach a student how to play a videogame. He/she will point out to the
robot facts about videogames. If the robot was playing double dragon, and
he was on the bridge scene, he will press the jump button when he gets to
the “edge” of the bridge. Sometimes, the robot will jump before the edge of
the bridge. The result is landing in the water, which loses a life. This
losing of a life will give the robot pain and he will find a new strategy
through logic and remember this strategy in the future.
This method of finding a new strategy was taught by
teachers. The robot will do something and if the robot fails, the teacher
will ask the robot: ”what did you do wrong”.
The answering of the question will give the robot a new strategy. The
teacher will also tell the robot to remember this strategy in the future
when it encounters the same problem. In the case of the double dragon game,
the robot will go to the very edge of the bridge, then
press the jump button. If it does this, the character in the game will
reach the other side of the bridge safely and this will cause pleasure for
the robot. The pathway to cross the bridge will be remembered, while other
unsuccessful methods to cross the bridge will be forgotten.
Activating element objects using object association
The event of jumping at the edge of a bridge (or any
platform for that matter) is strongly associated with the recognition of any
platform. The next time the robot (player) encounters a platform where it
has an edge and danger is located to the bottom of the platform, the
lesson: “jump at the edge of the platform” will activate.
Essentially, if-then statements will be added into the
event pool and the conscious will store the if-then statement as a rule.
Once the robot encounters a platform that has danger below it, then the
robot will activate the thought: “jump at the edge of the platform”. The
if-then statement that will be put into the event pool will look like this:
If recognize (platform with danger below), then
activate thought “jump at the edge of the platform”.
This if-then statement will be put into the event
pool. (You can refer to my previous books to learn about the event pool).
The event pool is just a container that the computer program in the
conscious uses to tell the robot certain events will happen at certain times
in the future. The event pool will also activate conscious thoughts at
certain times based on a recognized event.
The event pool is important because it allows the
conscious to manage simultaneous tasks easily. In my patent applications, I
use driving a car as an example. The robot predicts the future and the
event pool stores intelligent pathways (if-then statements, tasks, rules,
encapsulated intelligent pathways etc.). These intelligent pathways
reference when these tasks or rules or if-then statements will happen in
predicted future pathways.
Activating intelligent pathways using object
association
Referring to FIG. 15, an intelligent pathway such as
decision making can be activated the moment when the robot recognizes an
event. Imagine that the robot was playing a videogame and the character in
the game has to make a decision to travel on 2 paths. The top path is
dangerous, but short and the bottom path is easy, but long. The point where
the two paths intersect is the event that should trigger a decision
intelligent pathway. This decision pathway will use many facts from memory
and the videogame to come up with the decision of which path to take.
FIG. 15
In the decision pathway, the robot will use facts such
as:
1. If life energy is low take R2 path
2. If life energy is high take R1 path
Complex interconnected if-then statements can be used
during the decision making process such as: if life energy is low and goal
is to play for fun take R1 path.
The idea for this example is that when the robot
encounters a similar type of situation for a different game, the same
decision intelligent pathway will activate at that moment and the
robot’s conscious will generate the necessary
computer programs to make a decision.
Thus, the robot’s conscious can activate an intelligent
pathway based on recognizing a specific event.
The robot’s conscious can also activate an intelligent
pathway based on logical thoughts. For example, in the legend of Zelda
game, a logical thought might activate in the robot’s mind. This logical
thought will activate an intelligent pathway S2. Intelligent pathway S2
basically plans a route to get the character in the game from the current
location to a destination location. Imagine that the character in the game
activated a task to “get the silver sword”. In order to get the silver
sword the character has to go to a shop and buy the silver sword. Logic
will activate intelligent pathway S2 to get the character from the current
location to the shop.
A more general type of intelligent pathway can activate
because the robot recognizes danger. Danger can be anything that threatens
the character in the game. For example, jumping over the bridge is
considered a danger or moving on a cliff is considered danger. In the
moment the robot identify danger in the environment (which could be
anything), the conscious thought: “be careful” activates. This “be
careful” task will instruct the robot to pay more attention to the danger.
New intelligent pathways will also activate to find a specific way of
solving the danger. When the character in the game is confronted with
jumping over the bridge, the “be careful” task will activate. When the
character in the game is confronted with navigating through an asteroid
belt, the “be careful” task will activate.
There are many other variations that activate the “be
careful” task. The player might be fighting a boss and he repeatedly loses
life energy. This repeated pain for the robot will trigger the “be careful”
or “pay attention” task.
<< content
next chapter >>