Environments
Class Woods
java.lang.Object
|
+--Environments.Environment
|
+--Environments.Woods
- Direct Known Subclasses:
- SuttonSimple, Woods25, WoodsDist
- public class Woods
- extends Environment
This class is used to represent a standard Woods Environment
- Author:
- Olivier Sigaud and Pierre Gérard.
Constructor Summary |
Woods()
|
Woods(java.lang.String fileName)
|
Method Summary |
protected void |
addPerceptionFor_1(short x,
short y)
|
protected void |
addPerceptionFor_2(short x,
short y)
|
protected void |
addRuleFor(short x,
short y,
java.lang.String act)
|
protected void |
addRulesFor(short x,
short y)
|
void |
changeCellValue(int i,
int j,
int value)
|
protected void |
chooseStart()
|
java.lang.String |
computeFirstOutputs()
|
java.lang.String |
computeNewOutputs()
|
java.lang.String |
computeNewOutputs(boolean removeFoodWhenEaten)
|
protected java.lang.String |
computeOutput(short x,
short y)
|
protected void |
fillActionList()
|
protected void |
finalizeWoodsGeneration()
|
protected void |
fixAdditionnalBits_perc(short nbBitsToFix,
short x,
short y)
|
protected void |
fixAdditionnalBits(short nbBitsToFix,
short x,
short y)
|
protected void |
generateWoods(double probaWalls)
|
protected void |
generateWoods(short nbWalls)
|
java.lang.String |
getInputForm()
|
java.lang.String |
getOutputForm()
|
java.lang.String |
getStepInformation()
|
short |
getXSize()
Get the x size |
short |
getYSize()
Get the y size |
protected void |
initializeIrrelevantBits()
|
protected void |
initializeMap()
|
protected void |
initializeRandomBits()
|
protected boolean |
isMarkov()
|
protected void |
loadWoods(java.lang.String fileName)
|
java.util.Vector |
prepareForNewProblem()
|
protected void |
setMaps(Environments.Cell[][] m)
|
protected void |
setNbIrrelevantBits(short nb)
|
protected void |
setNbRandomBits(short nb)
|
protected void |
setNbSubGoalsToReach(short nb)
|
protected void |
setStart(int x,
int y)
|
java.lang.String |
toString()
|
protected void |
updateListOfPerceptions()
|
protected void |
updateRepresentativeRules()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
fixNbWalls
protected static final boolean fixNbWalls
- See Also:
- Constant Field Values
defaultXsize
protected static final byte defaultXsize
- See Also:
- Constant Field Values
defaultYsize
protected static final byte defaultYsize
- See Also:
- Constant Field Values
defaultProbaWall
protected static final double defaultProbaWall
- See Also:
- Constant Field Values
defaultNbWalls
protected static final short defaultNbWalls
- See Also:
- Constant Field Values
xStart
protected short xStart
yStart
protected short yStart
nbSubGoals
protected short nbSubGoals
nbSubGoalsReached
protected short nbSubGoalsReached
nbSubGoalsToReach
protected short nbSubGoalsToReach
nbRandomBits
protected short nbRandomBits
nbIrrelevantBits
protected short nbIrrelevantBits
additionnalBits
protected short[] additionnalBits
reinforcementForFeeding
protected double reinforcementForFeeding
action
protected byte action
chooseStartAtRandom
protected boolean chooseStartAtRandom
xSize
protected short xSize
ySize
protected short ySize
loader
protected Environments.WoodsLoader loader
generator
protected Environments.WoodsGenerator generator
actionList
protected java.util.ArrayList actionList
initMap
protected Environments.Cell[][] initMap
map
protected Environments.Cell[][] map
agent
protected Environments.Agent agent
Woods
public Woods(java.lang.String fileName)
- Parameters:
fileName
-
Woods
public Woods()
getXSize
public short getXSize()
- Get the x size
- Returns:
- short
getYSize
public short getYSize()
- Get the y size
- Returns:
- short
loadWoods
protected void loadWoods(java.lang.String fileName)
- Parameters:
fileName
-
generateWoods
protected void generateWoods(double probaWalls)
- Parameters:
probaWalls
-
generateWoods
protected void generateWoods(short nbWalls)
- Parameters:
nbWalls
-
finalizeWoodsGeneration
protected void finalizeWoodsGeneration()
fillActionList
protected void fillActionList()
prepareForNewProblem
public java.util.Vector prepareForNewProblem()
- Specified by:
prepareForNewProblem
in class Environment
- Returns:
- java.util.Vector
initializeIrrelevantBits
protected void initializeIrrelevantBits()
initializeRandomBits
protected void initializeRandomBits()
chooseStart
protected void chooseStart()
initializeMap
protected void initializeMap()
changeCellValue
public void changeCellValue(int i,
int j,
int value)
- Specified by:
changeCellValue
in class Environment
computeNewOutputs
public java.lang.String computeNewOutputs()
- Specified by:
computeNewOutputs
in class Environment
computeNewOutputs
public java.lang.String computeNewOutputs(boolean removeFoodWhenEaten)
- Parameters:
removeFoodWhenEaten
-
computeOutput
protected java.lang.String computeOutput(short x,
short y)
computeFirstOutputs
public java.lang.String computeFirstOutputs()
- Specified by:
computeFirstOutputs
in class Environment
getOutputForm
public java.lang.String getOutputForm()
- Specified by:
getOutputForm
in class Environment
- Returns:
- String
getInputForm
public java.lang.String getInputForm()
- Specified by:
getInputForm
in class Environment
- Returns:
- String
setStart
protected void setStart(int x,
int y)
- Parameters:
x
- y
-
setNbSubGoalsToReach
protected void setNbSubGoalsToReach(short nb)
- Parameters:
nb
-
setNbIrrelevantBits
protected void setNbIrrelevantBits(short nb)
- Parameters:
nb
-
setNbRandomBits
protected void setNbRandomBits(short nb)
- Parameters:
nb
-
setMaps
protected void setMaps(Environments.Cell[][] m)
addRuleFor
protected void addRuleFor(short x,
short y,
java.lang.String act)
- Parameters:
x
- y
- act
-
fixAdditionnalBits
protected void fixAdditionnalBits(short nbBitsToFix,
short x,
short y)
- Parameters:
nbBitsToFix
- x
- y
-
addRulesFor
protected void addRulesFor(short x,
short y)
- Parameters:
x
- y
-
updateRepresentativeRules
protected void updateRepresentativeRules()
fixAdditionnalBits_perc
protected void fixAdditionnalBits_perc(short nbBitsToFix,
short x,
short y)
- Parameters:
nbBitsToFix
- x
- y
-
addPerceptionFor_2
protected void addPerceptionFor_2(short x,
short y)
- Parameters:
x
- y
-
addPerceptionFor_1
protected void addPerceptionFor_1(short x,
short y)
- Parameters:
x
- y
-
updateListOfPerceptions
protected void updateListOfPerceptions()
isMarkov
protected boolean isMarkov()
- Returns:
- boolean
getStepInformation
public java.lang.String getStepInformation()
- Specified by:
getStepInformation
in class Environment
- Returns:
- String
toString
public java.lang.String toString()
- Specified by:
toString
in class Environment
- Returns:
- String