public class OnTheFlyLegionMove extends java.lang.Object implements java.util.Collection<LegionMove>
Modifier and Type | Class and Description |
---|---|
(package private) class |
OnTheFlyLegionMove.OnTheFlyLegionMoveIterator |
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.util.List<CritterMove>> |
allCritterMoves |
private static int |
GOOD_PARENT_TOP_PERCENT
Percentage from the top (of the already avaluated space) to pick
a 'good' parent.
|
private static java.util.logging.Logger |
LOGGER |
private static long |
MIN_MEMORY_REFILL
Amount of memory needed before a refill.
|
private static int |
MIN_PARENT_CHOICE
Minimum number of possible 'good' parents.
|
private int |
mysize |
private static int |
RANDOM_GENE_PERCENT
Percentage that a gene will be random instead of inherited.
|
private static int |
RANDOM_MAX_TRY
Maximum number of try before giving up generating a new element.
|
private static int |
RANDOM_PARENT_PERCENT
Percentage of a randomly chosen parent.
|
private static int |
REFILL_SIZE
number of elements to put in each new batch of element.
|
private static int |
SPONTANEOUS_GENERATION_PERCENT
Percentage of fully random new elements
This helps diversifying the gene pool.
|
Constructor and Description |
---|
OnTheFlyLegionMove(java.util.List<java.util.List<CritterMove>> acm) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(LegionMove o) |
boolean |
addAll(java.util.Collection<? extends LegionMove> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
equals(java.lang.Object o) |
(package private) int |
getDim() |
int |
hashCode() |
boolean |
isEmpty() |
java.util.Iterator<LegionMove> |
iterator() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
private static final int RANDOM_MAX_TRY
private static final int REFILL_SIZE
private static final int RANDOM_GENE_PERCENT
private static final int RANDOM_PARENT_PERCENT
private static final int GOOD_PARENT_TOP_PERCENT
private static final int MIN_PARENT_CHOICE
private static final int SPONTANEOUS_GENERATION_PERCENT
private static final long MIN_MEMORY_REFILL
private static final java.util.logging.Logger LOGGER
private final java.util.List<java.util.List<CritterMove>> allCritterMoves
private final int mysize
public OnTheFlyLegionMove(java.util.List<java.util.List<CritterMove>> acm)
int getDim()
public boolean add(LegionMove o)
add
in interface java.util.Collection<LegionMove>
public boolean addAll(java.util.Collection<? extends LegionMove> c)
addAll
in interface java.util.Collection<LegionMove>
public void clear()
clear
in interface java.util.Collection<LegionMove>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<LegionMove>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<LegionMove>
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<LegionMove>
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Collection<LegionMove>
hashCode
in class java.lang.Object
public boolean isEmpty()
isEmpty
in interface java.util.Collection<LegionMove>
public java.util.Iterator<LegionMove> iterator()
iterator
in interface java.lang.Iterable<LegionMove>
iterator
in interface java.util.Collection<LegionMove>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<LegionMove>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<LegionMove>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<LegionMove>
public int size()
size
in interface java.util.Collection<LegionMove>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<LegionMove>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<LegionMove>