|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.ObjectdecisionMakingSystem.ThingsManager
public class ThingsManager
register listeners for items, players etc. handles them and add to them affordances etc. also manages list of all items and operations over it - most important action for other parts of DMS is seeingItems, which add to perceptive field items of an affordance agent is looking for
| Field Summary | |
|---|---|
HashMap<cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId,Long> |
idTable
|
HashMap<Long,EItem> |
visibleItems
visible items - by unique integer ID |
| Constructor Summary | |
|---|---|
ThingsManager(Bot agent,
Logger log,
PerceptiveField field,
String directory,
DecisionModuleImpl decisionModule)
|
|
| Method Summary | |
|---|---|
void |
everyRoundUpdate(int counter)
|
ArrayList<EItem> |
getItemOfAffordance(AffordanceType aff)
used for instance in the increaseAttractivityToAllSources in perceptive field gets an item of provided AffordanceType |
boolean |
isNight()
|
boolean |
isReady()
|
static void |
main(String[] args)
just for testing - creates file with item parameters and verifies, that it is correct |
static void |
makeFirstEntry(String fileName)
saves example of itemParameters to xml file to have a sample of itemParameters.xml |
int |
probability(EItem newItem)
it counts the probability, item will be spoted by agent - probability is based on stress as well - about a time to get some idea how this work:) |
EItem |
processItem(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item item)
process Item to EItem |
EItem |
processItem(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemPickedUp item)
process AddItem to EItem - needed by inventory for instance |
EItem |
processItem(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint item)
process NavPoint to EItem |
EItem |
processItem(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player item)
process player to EItem |
EItem |
seeingItem(AffordanceType affordance)
called from SearchEnvironment as well as from SearchRandom again a little bit of a dark magic, so look at it closely, study Klara's bachelor thesis |
void |
setReady(boolean ready)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final HashMap<Long,EItem> visibleItems
public HashMap<cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId,Long> idTable
| Constructor Detail |
|---|
public ThingsManager(Bot agent,
Logger log,
PerceptiveField field,
String directory,
DecisionModuleImpl decisionModule)
| Method Detail |
|---|
public boolean isNight()
public void everyRoundUpdate(int counter)
public EItem processItem(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item item)
item -
public EItem processItem(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemPickedUp item)
item -
public EItem processItem(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint item)
item -
public EItem processItem(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player item)
item -
public static void makeFirstEntry(String fileName)
public static void main(String[] args)
args - public int probability(EItem newItem)
newItem -
public EItem seeingItem(AffordanceType affordance)
affordance - - affordance, which we are looking foraction - - action which will be satisfied by the item
public ArrayList<EItem> getItemOfAffordance(AffordanceType aff)
public boolean isReady()
public void setReady(boolean ready)
ready - the ready to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||