Package featurecat.lizzie.rules
Class BoardData
- java.lang.Object
-
- featurecat.lizzie.rules.BoardData
-
public class BoardData extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<MoveData>bestMovesintblackCapturesbooleanblackToPlayjava.lang.StringcommentbooleandummyintengineIndexdoublekomijava.util.Optional<int[]>lastMoveStonelastMoveColorintmoveMNNumberintmoveNumberint[]moveNumberListdoublescoreMeanStone[]stonesbooleanverifyintwhiteCapturesdoublewinrateZobristzobrist
-
Constructor Summary
Constructors Constructor Description BoardData(Stone[] stones, java.util.Optional<int[]> lastMove, Stone lastMoveColor, boolean blackToPlay, Zobrist zobrist, int moveNumber, int[] moveNumberList, int blackCaptures, int whiteCaptures, double winrate, int playouts, double scoreMean)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperties(java.lang.String propsStr)Add the properties from stringvoidaddProperties(java.util.Map<java.lang.String,java.lang.String> addProps)Add the propertiesvoidaddProperty(java.lang.String key, java.lang.String value)Add a key and valuejava.lang.StringbestMovesToString()BoardDataclone()static BoardDataempty(int width, int height)java.lang.StringgetOrDefault(java.lang.String key, java.lang.String defaultValue)Get a value with key, or the default if there is no such keyintgetPlayouts()java.util.Map<java.lang.String,java.lang.String>getProperties()Get the propertiesjava.lang.StringgetProperty(java.lang.String key)Get a value with keydoublegetScoreMean()static doublegetScoreMeanFromBestMoves(java.util.List<MoveData> bestMoves)doublegetWinrate()static doublegetWinrateFromBestMoves(java.util.List<MoveData> bestMoves)booleanisSameCoord(int[] coord)java.lang.StringpropertiesString()Get properties stringvoidsetPlayouts(int playouts)voidsync(BoardData data)voidtryToClearBestMoves()voidtryToSetBestMoves(java.util.List<MoveData> moves)
-
-
-
Field Detail
-
moveNumber
public int moveNumber
-
moveMNNumber
public int moveMNNumber
-
lastMove
public java.util.Optional<int[]> lastMove
-
moveNumberList
public int[] moveNumberList
-
blackToPlay
public boolean blackToPlay
-
dummy
public boolean dummy
-
lastMoveColor
public Stone lastMoveColor
-
stones
public Stone[] stones
-
zobrist
public Zobrist zobrist
-
verify
public boolean verify
-
winrate
public double winrate
-
engineIndex
public int engineIndex
-
komi
public double komi
-
scoreMean
public double scoreMean
-
bestMoves
public java.util.List<MoveData> bestMoves
-
blackCaptures
public int blackCaptures
-
whiteCaptures
public int whiteCaptures
-
comment
public java.lang.String comment
-
-
Method Detail
-
empty
public static BoardData empty(int width, int height)
-
addProperty
public void addProperty(java.lang.String key, java.lang.String value)Add a key and value- Parameters:
key-value-
-
getProperty
public java.lang.String getProperty(java.lang.String key)
Get a value with key- Parameters:
key-- Returns:
-
getOrDefault
public java.lang.String getOrDefault(java.lang.String key, java.lang.String defaultValue)Get a value with key, or the default if there is no such key- Parameters:
key-defaultValue-- Returns:
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
Get the properties- Returns:
-
addProperties
public void addProperties(java.util.Map<java.lang.String,java.lang.String> addProps)
Add the properties
-
addProperties
public void addProperties(java.lang.String propsStr)
Add the properties from string
-
propertiesString
public java.lang.String propertiesString()
Get properties string- Returns:
-
getWinrate
public double getWinrate()
-
tryToClearBestMoves
public void tryToClearBestMoves()
-
tryToSetBestMoves
public void tryToSetBestMoves(java.util.List<MoveData> moves)
-
getWinrateFromBestMoves
public static double getWinrateFromBestMoves(java.util.List<MoveData> bestMoves)
-
getScoreMean
public double getScoreMean()
-
getScoreMeanFromBestMoves
public static double getScoreMeanFromBestMoves(java.util.List<MoveData> bestMoves)
-
bestMovesToString
public java.lang.String bestMovesToString()
-
setPlayouts
public void setPlayouts(int playouts)
-
getPlayouts
public int getPlayouts()
-
sync
public void sync(BoardData data)
-
clone
public BoardData clone()
- Overrides:
clonein classjava.lang.Object
-
isSameCoord
public boolean isSameCoord(int[] coord)
-
-