|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.mebigfatguy.polycasso.ImprovementTypeStats
public class ImprovementTypeStats
a class to keep track of success statistics by improvement type, in order to further tune what improvement types to try in the future. It modifies a purely random selection criteria to one that is tuned by performance.
| Constructor Summary | |
|---|---|
ImprovementTypeStats()
creates an initial state of statistics |
|
| Method Summary | |
|---|---|
ImprovementType |
getRandomImprovementType()
returns a random improvement type that is influenced by how successful the types have been in the past. |
java.lang.String |
toString()
builds a string of all the different types success statistics |
void |
typeWasSuccessful(ImprovementType type,
boolean successful)
increment a type's statistics whether success or fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ImprovementTypeStats()
| Method Detail |
|---|
public void typeWasSuccessful(ImprovementType type,
boolean successful)
type - the improvement type that is to be updatedsuccessful - if the improvement was successfulpublic ImprovementType getRandomImprovementType()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||