MEXICA is the implementation of a model of the cognitive process that has been used originally to create histories as a writer would do alternating between two theoretical estates: engagement and reflection, this is a first state of generation of ideas and a second process logical construction of such ideas, this is, based on the Piaget's theory if cognitive development
Guns it’s a video game which, using this model of the creativity process as artificial intelligence implementation, tries to win a match against a human player in a strategy video game style (RTS or Real Time Strategy). At running time, the A.I. build a game strategy using previous experience collected of a experimentation phase with human players, whose information was processed and saved in text files.
Guns then is a dynamic environment whose updates adapts and control a team composed by 3 different agents with different and specific features in order to win the match.
Code available here
Background
These are the basic premises of guns:
1. The environment around us (an extremely complex system) generate lots of information which is perceived and understood by our brain using processes of codification, filtration, abstraction and storage just before to be processed/used to take decisions.
2. We have to have original and starting coded information into the head to start to think. This original information is composed by very basic concepts embedded like instincts like order notion and others, as well as all the necessary for the process of comparing, validating and mixing to create new information.
3. In the human creative process there are two essential states: 1) Generator ideas process: based on previous experience (saved information) where ideas come up to be part of the options to the creative material in progress, and 2) Evaluation process: Validating the ideas generated at the last state and add it to the material being created.
MEXICA's Pérez claims that there are 2 principal states which he calls 1) Engagement and 2) Reflection where the model take its name: Engagement-Reflection (ER).
In this research, I took the Perez’s ideas and they were adapted to work in a Dynamic environment. To do this it was necessary to construct an artificial environment were intelligent agents live. These last have all the necessary abilities to interact with the environment, evaluate it and adapting themselves taking decisions according with the environment changing status as is shown in figure 1
Figure 1. The creative task on the human brain
Figure 1 shows the idealization implemented in guns: the human brain is part of a thinking entity which , at the same time, is integral part of a dynamic environment (the universe).
The type, clarity and amount of information that the thinking entity is capable to perceive from the environment that is susceptible to get processed, it is constricted by the entity perception capacities and depends very much on its ability to process the perceived data's complexity. In a similar way, the complexity and therefore, the information generated by the environment depends directly on the its complexity. This last mean, that the complexity of what happen inside the environment has specific limits, as well as the capacities to perceive the complexity of the information by the agents that live into the environment itself. All defined by the rules that control the universe at all.
The entity perseption feartures are determinated by quantity and quality of the sensors that it has. Likewise the perceived information quality depends directly on sensors capabilities. But at other hand, the selection by relevance of the information is done through the “attention” given to a particular events, so that, not all the information is important deppending on specific circunstances.
Finally, the relevant information, all of that wich crossed the filter of the attention it is processed in such a way that is coded in a standard way to be easy interpreted and used. Due the information, in general, has different nature since is perceived for different kind of sensors, and it is related with a specific event perceived.
It could be said that the information saved (learned) is related specifically to a kind of event, but this is not necessary true. It is well known that the human brain is capable to overlap information related specifically with an event with absolutely new experiences. To make this last possible, it is necessary that any data or any piece of information have universal characteristics. This could be explained by means the example to learn by experience. At the daily life, the babies could learn that the fire burns and hurts by experience (well, I really hope they don’t learn this way about the fire, but it is a very good example for purposes of explanation). If the baby burned because touched the fire at the stove, this does not mean that he just will learn that just that kind or source of fire burns. He has to know that any kind of fire has the same effect.
To this activity: gives a universal character or extend the information to a very wide threshold of significance is called by experts as the abstraction of information, which take place, as the figure 1 shows just after the standardization or codification of the information. In this way then, it could be said that the abstraction or universalization of the information is strongly related with the codification of the information.
Once the information has been abstracted, it has to come to be part of the memories in the brain in an almost permanent way, depending on the frequency of the use of the information. This information is called previous experience and represents the integral material that we use to construct new creative things.
The creative process, as it has been explained already, it consist essentially in two specific states: 1) Engagement: where by means a selection criterion, ideas are taken from the previous experience, but as happens the most part of the time, the selection ideas process could be a random fact and 2) Reflection: where the ideas selected on the engagement state are evaluated and adapted –if it is possible- to the material constructed at the really moment. It has to be said that, some times the reflection state, to validate the ideas, need to bring new ideas to help to the construction of a complete invention. This last mean that the creative process consist in cycles between these two states till the complete evaluation of the material is considered as valid and coherent depending on the evaluation rules and criterion (what coincide with a personal criterion of a thinking entity and gives freedom and a personal touch to the creative process).
As is well seen at the figure one, the creative process is a repetitive process or recurrent process that needs a base structure where put and order the material that is taken from the previous experience. This structure is very dynamic, but it is changing all the time till the rule or criterion to finish the process is reached.
When the new material it’s evaluated and it is well qualified, then, by means criterion also, it is decided if this new thing developed will be part now of the previous experience.
But at any time, as much as the previous experience as the new knowledge, are available to be used by the thinking entity depending on it’s capabilities to interact with the environment and then, it can be said that the actions taken by the entities affect to the environment and make it part of the dynamism of this.
ENGAGEMENT-REFLECTION MODEL
Essentially, the Engagement-Reflection model (ER) proposed by Sharples, establish that there are two principal states in the creative process, this mean, when somebody wants to carry out some material original and creative: 1) Engagement: When the person build a lot of ideas, some of them crazy and others reasonable like in a rain ideas but always based on the total of information saved as previous experience and 2) Reflection: The state where the ideas produced on the Engagement state are evaluated, filtered and after that, one or several of them are chosen to be integral part of the carried out work.
The two principal states of the model ER work with information that it is assumed to exist already in a code format susceptible to be interpreted by means consistent and specialized process. At the same time, there has to exist a process responsible for the reception and codification of the information generated and received from the environment and at the same time a way to perceive this information.
In ER model there is something called Abstract information representation which is the information the MEXICA system works with. The Abstract representation is divided in context and these last, at the same time are divided on atoms (the most simple information units). Additionally, MEXICA use a code of values to handle the emotions evolved on the tale object.
GUNS: THE ENVIRONMENT
Guns it’s a strategy videogame where two teams play a match, where one has to try to defeat the enemy using different kind of attacks.
The strategy consist simply in get as much material as be possible, which it is distributed along the game area (Wood, Metal and Rock) and use them to change it for tools (power targets), weapons (like robots, bombs) and to get a kind of resistance for the team members of each team.
Each kind of attack causes a particular kind of damage to the enemy. Then, using the weapons, tramps and holding as material as be possible the user has to try to defeat to the opponent. The game ends when either, every agent of the enemy team is destroyed or the control base of the enemy is destroyed.
Exists in the environment a danger area where it is possible that suddenly appears tornados capables to hurt an agent at all and kill it. At the same time in the danger area could appears power targets that the it could be used to froze for a little while to the enemy team.
The two teams have a tramp also that they can use to catch an enemy soldier and disabled it to get free of attacks, then the tramped soldier cannot fight, which it’s a gold opportunity to defeat in someway to the enemy. Nevertheless, the tramped soldier can be saved by any other of his team.
Each soldier of each team has specific features, for example, just one of then it is capable to put and turn on the bobs (bomber) and just other one it is capable to use the tramps (spy).
Using all this features and the limits of the environment, an user have to try to defeat the enemy.
THE ADAPTATION OF THE ER MODEL TO GUNS GAME
GUNS works with several premises:
1. The environment is dynamic (it change in time).
2. The data that define the GUNS environment has a special a specific interpretation for the system itself because must be understood by the agents who “live” in the environment. This understanding must be defined by the “knowledge” that the agents poses.
3. The evaluation of the changing system must be constant in order to take decisions.
Establishing the environment
As the one of the fist step to implement the adaptation of the ER model to Guns, It was necesesary to recover all the information that the environment was able to produce. Then in the first phase of this research Guns was made as a simple videogame where the rules were established (from the developer view point the rules were defined as the limitations and specific features of the agents that compose a team. From dynamic systems analyzer view point the rules were specified as the limits of the environment and interactions between environment and the actors or agents).
To establish the limits of the agents was necessary define what were they cables to “feel” to be capable to react. All this features were handled into the computer code as messages or signals. For this task it was necessary make a program called Messages-generator in order to have the control over the list of capabilities of each agent.
The experimentation phase
To build the knowledge of the agents was necessary an initial experimentation phase to recompile all the possible information generated by the environment. To do this initially Guns was enabled to be used by a couple of users where one tried to defeat to the other, each one controlling a team.
The premise for the experimentation is to identify what information it’s the important to take one decision. Because as in the real world, we, the humans, even we are receiving a lot of information along all our senses, just some information is taken in account to take a decision. And, also, as in the real world, all the information is coded in a specific way to be interpreted for the brain to get understand. In this case, the information of Guns has its own nature, and of course, its own interpretation.
To build the bridge between the codes used naturally in the environment and its interpretation to take decisions, it was necessary a kind of experimentation where the date generated by the environment were related directly with a specific interpretation.
In this first phase of experimentation was saved all the possible information about what was happened in a match. The experimentation included an option where the users, after to take a decision they wrote why they were taking a specific decision. Then the interface of guns was modified to save all this information including the comments of the users
There was made a lot of experimentation with volunteers, that much that some of the 5 gamers were considerate like experts playing the game.
To the amount of the information obtained in this first experimentation phase was called previous experience and the files were very large some of them.
Processing the previous experience
The previous experience was in a very general way. It was like to have information in a very high level of interpretation because it was a lot of technical information (info generated by the environment like the status of global variables or agent’s status) related with a very specific and personal interpretation of the status and general situation of the environment of Guns (the users’ comments).
For the above, it was necessary to study this experience. To do this, it was developed too much more tools, for example one to reproduce in a static way the status of the agents and in general, the status of the environment
At the same time it was added functionally to the Guns to explode exhaustively all the variables and the information of a match.
Due to this last evaluation and analysis of the obtained information, it was possible notice that there were transcendent variables that could be studied its effect by means its values at a specific time. Then in the research were identified values of these variables that could be named and handled in a tension way.
As other principal result of this analysis, due it was identified and developed a way to standard the information, it was one more program that it has the purpose of translate all the comments of the user at the experimentation phase in a standard way. This is the construction of the Abstract information, where the amount of information has an interpretation already and it could be understood by the system.
This new program has as purpose to process or standard the information obtained as previous experience.
The principal idea of this last information processing was to abstract the information obtained in the experimentation phase carried out with human users. The general result was the fact that I could relate a status of the system (the real variable’s value in a discrete time) with an expression (just like the human brain constructs concepts with words, relating these expressions with something on the real world).
An important result was that it could be identified what kind of data the players put attention during the game and what kind of situations were related with the event that force them to put attention on those data. Even more, it was possible to construct a series of concepts to identify and determine important things of very high level of abstraction like the strategy, final objective and attitude of the player during the entire long match and related these concepts with am specific status in the environment.
Adaptation implementation ER model
The red team in Guns game was chosen like the team controlled by the Artificial intelligence, this is, the adaptation of the ER model.
What it is done is the following
1. Randomly or based on the previous and processing experience it is chosen a strategy (the grade of attention or the importance given to the events into the environment, this mean, for instance, if the artificial intelligence will take advantage of all the chances to attack to the soldiers and if it will take in account all the chances when a power target appear or if it will use all the soldiers for just one common task at a specific time), a final objective (how it will try to win, if it will try to destroy the soldiers of the control base or both) and an attitude (aggressive: it not take much care about the danger, or careful: It will be very important the tensions produced by the threats around the team).
2. Once the Strategy, final objective and attitude are chosen, it is build a structure called master structure, that at the same time it is composed by structures called contexts, composed, at the same time by atoms. In this set of structures, the AI asks to itself, what I want to do? (Final objective), How do I can reach this last objective? Then in this part examine the previous experience and see what it can do, when it knows what it can do add this action to the structure and ask to itself, Can I execute this action? If not… Why I can’t? How can I solve this problem? (Review the list of precondition of and action) and update the master structure with the necessary actions to reach its goal. By means to be cycling into the generating actions and evaluating the list of actions and updating the list of actions the AI build all a plan to play. Then gives the orders to the team to be executing.
3. The master structure is dynamic. This means that depending on the tensions of the environment that it update itself adding/deleting actions. Then, a evaluating constant action it is executed for the team components and sending signals to the brain of the system and taking decisions.