org.moyoman.module.random
Interface Random
- All Superinterfaces:
- Cloneable, ModuleInterface, Serializable
- All Known Implementing Classes:
- RandomImpl
- public interface Random
- extends ModuleInterface
A class that implements the Random interface is responsible
for giving a random rating to each legal move, as well as
providing a method to allow the caller to randomly choose
from among N options.
Field Summary |
static float |
CONFIDENCE
The confidence of moves chosen by a module of this type. |
Method Summary |
short |
getRandomShort(short total)
This method is used for choosing randomly among total equal alternatives. |
CONFIDENCE
public static final float CONFIDENCE
- The confidence of moves chosen by a module of this type.
- See Also:
- Constant Field Values
getRandomShort
public short getRandomShort(short total)
- This method is used for choosing randomly among total equal alternatives.
This method can be used for tasks such as choosing among different fuseki,
or any other case where different moves are a matter of style, and
the caller wants to play different styles in different games. This method
should be called in preference to the caller creating his own java.util.Random
class, since calling this method allows for reproducibility for debugging purposes.