w2mind.computing.dcu.ie -> tyrrell's simulated environment -> state and action
1. Introduction
The state represents the various stimuli that are available to the animal at any point in time. Using these stimuli, the animal's mind selects an action from a set of thirty five available to the animal, and this action is (usually) carried out. The stimuli are subject to error, depending on various factors, such as the animal's health, the time of day, the amount of vegetation in the surrounding areas etc.
Certain stimuli refer to a particular direction (numbered from 0 - 8), in which case directions are as follows:
| 8 (North West) | 1 (Due North) | 2 (North East) |
| 7 (Due West) | 0 (Animal's Cell) | 3 (Due East) |
| 6 (South West) | 5 (Due South) | 4 (South East) |
2. State
The following is a sample state:
perceivedFatShortage:0.7368006702911585; perceivedCarbohydrateShortage:0.787908164961922; perceivedProteinShortage:0.6882473937770764; perceivedWaterShortage:0.5698663136201775; perceivedAnimalLowTemperature:0.0; perceivedAnimalHighTemperature:0.1854426830319721; perceivedCellLowTemperature:0.0; perceivedCellHighTemperature:0.4622199293598596; mateCourted:0.0; perceivedAnimalCleanliness:0.37677294646217335; nightProximity:0.12612951127140995; animalVariance:1.0; distanceFromDen:1.0; foodPerceptionStimulus:[0.0,0.1,0.0,0.6917457920190416,0.5023220026660983,0.6917457920190416,0.1,0.0,0.05426941632675048]; foodMemoryStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; waterPerceptionStimulus:[0.99999,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; waterMemoryStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; shelterPerceptionStimulus:[0.0,0.0,0.0,0.3253028576810692,0.4230684794708529,0.4722175,0.0,0.0,0.6666600000000001]; shadePerceptionStimulus:[0.0,0.0,0.0,0.3253028576810692,0.4230684794708529,0.4722175,0.0,0.0,0.6666600000000001]; predator1PerceptionStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; predator2PerceptionStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.6666666666666667,0.0,0.0]; dangerousPlacePerceptionStimulus1:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; irrelevantAnimalPerceptionStimulus1:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; matePerceptionStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; denPerceptionStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; denMemoryStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; timeSinceLastScan:0.6666666666666666; distanceToCover:0.0; timeSinceLastPredator:0.0; animalHealth:0.645730064246499; animalPermanentInjury:0.0; dangerousPlacePerceptionStimulus2:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; irrelevantAnimalPerceptionStimulus2:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]; preyInAnimalSquare:false; fruitFoodInAnimalSquare:true; cerealFoodInAnimalSquare:false;
This is this information that is given to the mind at each time step, and the format it will be given it (without carriage returns). Each element is described in the table below.
| perceivedFatShortage | This is a variable between 0.0 and 1.0 that reflects the animal's perception of how short of fat it is. The closer the value is to 1.0 the more serious the shortage. |
| perceivedCarbohydrateShortage | This is a variable between 0.0 and 1.0 that reflects the animal's perception of how short of carbohydrate it is. The closer the value is to 1.0 the more serious the shortage. |
| perceivedProteinShortage | This is a variable between 0.0 and 1.0 that reflects the animal's perception of how short of protein it is. The closer the value is to 1.0 the more serious the shortage. |
| perceivedWaterShortage | This is a variable between 0.0 and 1.0 that reflects the animal's perception of how short of water it is. The closer the value is to 1.0 the more serious the shortage. |
| perceivedAnimalLowTemperature | This is a variable between 0.0 and 1.0 that reflects the animal's perception of whether it is too cold, and if so, to what degree. The closer the value is to 1.0 the more serious the coldness. |
| perceivedAnimalHighTemperature | This is a variable between 0.0 and 1.0 that reflects the animal's perception of whether it is too hot, and if so, to what degree. The closer the value is to 1.0 the more serious the heat. |
| perceivedCellLowTemperature | This is a variable between 0.0 and 1.0 that reflects the animal's perception of whether the external temperature is too cold, and if so, to what degree. The closer the value is to 1.0 the more serious the coldness. |
| perceivedCellHighTemperature | This is a variable between 0.0 and 1.0 that reflects the animal's perception of whether the external temperature is too hot, and if so, to what degree. The closer the value is to 1.0 the more serious the heat. |
| mateCourted | This is a variable between 0.0 and 1.0 that reflects the animal's perception of whether it thinks the mate that is in the cell with it has been courted. A value of 0.0 identifies a situation where there is either no mate in the cell, or the animal has not courted the mate in the cell. A value of 1.0 means that there is a mate in the cell, and it has been courted. |
| perceivedAnimalCleanliness | This is a variable between 0.0 and 1.0 that reflects the animal's perception of how clean. The closer the value is to 1.0 the cleaner the animal is. |
| nightProximity | This is a variable between 0.0 and 1.0 that reflects the animal's perception of how close in time it is to night time. A value of 1.0 represents night time. A value of 0.0 represents the furthest time from the next night i.e. early morning. |
| animalVariance | This is a variable between 0.0 and 1.0 that reflects the animal's perception of how lost it is. The closer the value is to 1.0 the more lost it is. |
| distanceFromDen | This is a variable between 0.0 and 1.0 that reflects the animal's perception of how far it is from the den. The closer the value is to 1.0 the firther the animal is from its den. Note that this is not an exact measure of the number of cells distance from the den, rather a scaled representation of how serious the distance from the den is.. |
| foodPerceptionStimulus | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives food in each of the nine directions, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of food. |
| foodMemoryStimulus | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal remembers food in each of the nine directions, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the memory of food. |
| waterPerceptionStimulus | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives water in each of the nine directions, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of water. |
| waterMemoryStimulus | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal remembers water in each of the nine directions, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the memory of water. |
| shelterPerceptionStimulus | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives shelter in each of the nine directions, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of shelter. |
| shadePerceptionStimulus | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives shade in each of the nine directions, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of shade. |
| predator1PerceptionStimulus | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives a predator 1 in each of the nine directions, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of a predator 1. |
| predator2PerceptionStimulus | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives a predator 2 in each of the nine directions, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of a predator 2. |
| dangerousPlacePerceptionStimulus1 | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives a dangerous place in each of the nine directions, but only for adjacent cells, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of a dangerous place. |
| irrelevantAnimalPerceptionStimulus1 | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives an irrelevant animal in each of the nine directions, but only for adjacent cells, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of an irrelevant animal. |
| dangerousPlacePerceptionStimulus2 | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives a dangerous place in each of the nine directions, but only for non-adjacent cells, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of a dangerous place. |
| irrelevantAnimalPerceptionStimulus2 | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives an irrelevant animal in each of the nine directions, but only for non-adjacent cells, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of an irrelevant animal. |
| matePerceptionStimulus | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives a mate in each of the nine directions, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of a mate. |
| denPerceptionStimulus | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal perceives a den in each of the nine directions, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the perception of a den. |
| denMemoryStimulus | This is an array of nine variables between 0.0 and 1.0 reflecting the degree to which the animal remembers a den in each of the nine directions, starting with its own square, followed by the direction NORTH and continuing clockwise through each of the directions. The closer each value is to 1.0 the more serious the memory of a den. |
| timeSinceLastScan | This is a variable between 0.0 and 1.0 that reflects the animal's perception of how long it is since it last scanned for predators. The closer the value is to 1.0 the longer the time. Note that this is not an exact measure of the number of timesteps since the last scan, rather a scaled representation of how serious the length of time is. |
| distanceToCover | This is a variable between 0.0 and 1.0 that reflects the animal's perception of how far it is from the den. The closer the value is to 1.0 the firther the animal is from cover. Note that this is not an exact measure of the number of cells distance from cover, rather a scaled representation of how serious the distance from cover is.. |
| timeSinceLastPredator | This is a variable between 0.0 and 1.0 that reflects the animal's perception of how long it is since it last perceived a predator. The closer the value is to 1.0 the longer the time. Note that this is not an exact measure of the number of timesteps since the last predator, rather a scaled representation of how serious the length of time is. |
| animalHealth | This is a variable between 0.0 and 1.0 that reflects the animal's health. The animal dies when this reaches 0. |
| animalPermanentInjury | This is a variable between 0.0 and 1.0 that reflects the permanent injuries that the animal has suffered due to other animals and dangerous places. |
| preyInAnimalSquare | This is a boolean value, it will be true if there is prey in the animal's cell, false otherwise. |
| fruitFoodInAnimalSquare | This is a boolean value, it will be true if there is fruit food in the animal's cell, false otherwise. |
| cerealFoodInAnimalSquare | This is a boolean value, it will be true if there is cereal food in the animal's cell, false otherwise. |
3. Action
Given the above state, it is the function of the mind to select an appropriate action. There are thirty five numbered actions. The mind selects the action and returns the number corresponding to this action. The animal carries this action out with a certain probability.
| Number | Name | Description |
| 0 | SLEEPING | Instruct the animal to sleep. |
| 1 | RESTING | Instruct the animal to rest. |
| 2 | FREEZING | Instruct the animal to freeze where it is. |
| 3 | EATING_CF | Instruct the animal to attempt to eat the cereal food that is in the current cell |
| 4 | EATING_FF | Instruct the animal to attempt to eat the fruit food that is in the current cell |
| 5 | DRINKING | Instruct the animal to attempt to drink the water that is in the current cell |
| 6 | CLEANING | Instruct the animal to attempt to take some time to clean itself |
| 7 | COURT_DISPLAYING | Instruct the animal to attempt to attempt to court the mate in the current cell |
| 8 | MATING | Instruct the animal to attempt to attempt to mate with the receptive mate in the current cell. |
| 9 | POUNCING | Instruct the animal to attempt to pounce on, kill and eat the prey that is in the current cell |
| 10 | LOOKING_AROUND | Instruct the animal to attempt to look around and increase its perceptions of its surroundings. |
| 11 | LOOKING_N | Instruct the animal to attempt to look NORTH and thus get clearer perceptions of what is in the cells in that direction. |
| 12 | LOOKING_NE | Instruct the animal to attempt to look NORTH EAST and thus get clearer perceptions of what is in the cells in that direction. |
| 13 | LOOKING_E | Instruct the animal to attempt to look EAST and thus get clearer perceptions of what is in the cells in that direction. |
| 14 | LOOKING_SE | Instruct the animal to attempt to look SOUTH EAST and thus get clearer perceptions of what is in the cells in that direction. |
| 15 | LOOKING_S | Instruct the animal to attempt to look SOUTH and thus get clearer perceptions of what is in the cells in that direction. |
| 16 | LOOKING_SW | Instruct the animal to attempt to look SOUTH WEST and thus get clearer perceptions of what is in the cells in that direction. |
| 17 | LOOKING_W | Instruct the animal to attempt to look WEST and thus get clearer perceptions of what is in the cells in that direction. |
| 18 | LOOKING_NW | Instruct the animal to attempt to look NORTH WEST and thus get clearer perceptions of what is in the cells in that direction. |
| 19 | MOVE_N | Instruct the animal to attempt to move one cell NORTH. |
| 20 | MOVE_NE | Instruct the animal to attempt to move one cell NORTH EAST. |
| 21 | MOVE_E | Instruct the animal to attempt to move one cell EAST. |
| 22 | MOVE_SE | Instruct the animal to attempt to move one cell SOUTH EAST. |
| 23 | MOVE_S | Instruct the animal to attempt to move one cell SOUTH. |
| 24 | MOVE_SW | Instruct the animal to attempt to move one cell SOUTH WEST. |
| 25 | MOVE_W | Instruct the animal to attempt to move one cell WEST. |
| 26 | MOVE_NW | Instruct the animal to attempt to move one cell NORTH WEST. |
| 27 | MOVE2_N | Instruct the animal to attempt to move as many cells as possible NORTH. |
| 28 | MOVE2_NE | Instruct the animal to attempt to move as many cells as possible NORTH EAST. |
| 29 | MOVE2_E | Instruct the animal to attempt to move as many cells as possible EAST. |
| 30 | MOVE2_SE | Instruct the animal to attempt to move as many cells as possible SOUTH EAST. |
| 31 | MOVE2_S | Instruct the animal to attempt to move as many cells as possible SOUTH. |
| 32 | MOVE2_SW | Instruct the animal to attempt to move as many cells as possible SOUTH WEST. |
| 33 | MOVE2_W | Instruct the animal to attempt to move as many cells as possible WEST. |
| 34 | MOVE2_NW | Instruct the animal to attempt to move as many cells as possible NORTH WEST. |
4. Score
In addition to the state, at each point in time the score is returned by the environment. At the end of a run, the final score of the run will be stored and displayed in the score board.
An example score is as follows:
| 0, 306 (0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 154) [0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 12, 0, 0, 12, 1, 0, 0, 0, 1, 42, 17, 76, 19, 53, 7, 41, 21, 0, 1, 0, 0, 0, 0, 0, 0] |
The format for the score is given below:
| NUMBER_OF_TIMES_MATED, NUMBER_OF_TIMESTEPS_SURVIVED (TIMES_EATEN_NON_TOXIC_FRUIT_FOOD, TIMES_EATEN_TOXIC_FRUIT_FOOD, TIMES_EATEN_NON_TOXIC_CEREAL_FOOD, TIMES_EATEN_TOXIC_CEREAL_FOOD, TIMES_EATEN_PREY, TIMES_DRUNK_NON_TOXIC_WATER, TIMES_DRUNK_TOXIC_WATER, TIMES_INJURED_BY_IRRELEVANT_ANIMAL, TIMES_INJURED_BY_PREDATOR_1, TIMES_INJURED_BY_PREDATOR_2, TIMES_INJURED_BY_DANGEROUS_PLACE, TIMES_LOST) [NUMBER_OF_TIMES_ACTION_0_CHOSEN, ... NUMBER_OF_TIMES_ACTION_34_CHOSEN] |
The scores are ranked according to the first two numbers only. The remaining data is for information only.
|
home (w2mind.computing.dcu.ie), tyrrell's simulated environment, challenge. documentation, tools, blocks world |
|
Ciarán O'Leary, Ciaran.OLeary@comp.dit.ie, www.comp.dit.ie/coleary, Last updated, 26th November 2003 |