|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvooga.aiEngine.stickfightergameAI.StickFightAIMemory
public class StickFightAIMemory
StickFightAIMemory.java
Constructor Summary | |
---|---|
StickFightAIMemory(java.util.Map<java.lang.String,java.lang.Integer> CPUmoves,
java.lang.String game,
java.lang.String character)
A constructor that reads in a list of moves, a game and a character so that the computer can keep track of the number of times each move is used. |
Method Summary | |
---|---|
int |
getduration()
Returns the number of times the AI has processed information. |
double |
getoddsofmove(java.lang.String s)
Reads through player trends to try to pick out the odds that a player will carry out a particular move. |
void |
incrementmove(java.lang.String s)
Increments a move counter, with an input of a move name to be incremented. |
void |
readFromFile(java.lang.String filename)
Reads in a player's history to try to adjust the AI to respond according to player trends. |
void |
registertargetPositon(Position in)
Remembers targets' positions for output to a history file or to a map of lists containing each player's possible positions. |
void |
writeToFile(java.lang.String playeraction)
Writes player actions to an output file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StickFightAIMemory(java.util.Map<java.lang.String,java.lang.Integer> CPUmoves, java.lang.String game, java.lang.String character) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void incrementmove(java.lang.String s)
s
- - string representing move to be incremented.public int getduration()
public void registertargetPositon(Position in)
in
- - A new position to be recorded.public double getoddsofmove(java.lang.String s)
s
- - A string corresponding to a particular action event
public void writeToFile(java.lang.String playeraction) throws java.io.IOException
playeraction
- - An action carried out by a player that needs to be recorded.
java.io.IOException
public void readFromFile(java.lang.String filename) throws java.io.IOException
filename
- - filepath to be read in.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |