Package featurecat.lizzie.analysis
Class Leelaz
java.lang.Object
featurecat.lizzie.analysis.Leelaz
An interface with leelaz go engine. Can be adapted for GTP, but is specifically designed for
GCP's Leela Zero. leelaz is modified to output information as it ponders see
www.github.com/gcp/leela-zero
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
boolean
boolean
boolean
boolean
boolean
boolean
static double
boolean
double
double
boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(LeelazListener listener) void
analyzeAvoid
(String parameters) void
analyzeAvoid
(String type, String color, String coordList, int untilMove) void
void
boardSize
(int size) void
boardSize
(int width, int height) void
clear()
int
void
void
void
void
genmove_analyze
(String color) void
handicap
(int num) boolean
isCommandChange
(String command) boolean
isDown()
boolean
isLoaded()
boolean
boolean
void
komi
(double komi) void
parseInfoKatago
(String line) void
void
ponder()
This initializes leelaz's pondering mode at its current positionvoid
removeListener
(LeelazListener listener) void
void
sendCommand
(String command) Sends a command to command queue for leelaz to executevoid
sendToWriterThread
(String command) void
void
shutdown()
End the processsplitCommand
(String commandLine) void
void
void
boolean
boolean
void
void
void
void
undo()
static double
winrateToHandicap
(double pWinrate) Convert winrate to handicap stones, by normalizing winrate by first move pass winrate (one stone handicap).
-
Field Details
-
gtpConsole
public boolean gtpConsole -
board
-
isAttached
public boolean isAttached -
isSettingHandicap
public boolean isSettingHandicap -
isThinking
public boolean isThinking -
isInputCommand
public boolean isInputCommand -
preload
public boolean preload -
isKataGo
public boolean isKataGo -
supportScoremean
public boolean supportScoremean -
scoreMean
public double scoreMean -
scoreStdev
public double scoreStdev -
engineIndex
public static int engineIndex -
mHandicapWinrate
public static double mHandicapWinrate
-
-
Constructor Details
-
Leelaz
Initializes the leelaz process and starts reading output- Throws:
IOException
org.json.JSONException
-
-
Method Details
-
startEngine
- Throws:
IOException
-
restartEngine
- Throws:
IOException
-
normalQuit
public void normalQuit() -
parseInfo
-
parseInfoKatago
-
sendCommand
Sends a command to command queue for leelaz to execute- Parameters:
command
- a GTP command containing no newline characters
-
beginModifyingBoard
public void beginModifyingBoard() -
endModifyingBoard
public void endModifyingBoard() -
playMove
- Parameters:
color
- color of stone to playmove
- coordinate of the coordinate
-
genmove
-
genmove_analyze
-
time_settings
public void time_settings() -
clear
public void clear() -
boardSize
public void boardSize(int size) -
boardSize
public void boardSize(int width, int height) -
komi
public void komi(double komi) -
handicap
public void handicap(int num) -
undo
public void undo() -
analyzeAvoid
-
analyzeAvoid
-
ponder
public void ponder()This initializes leelaz's pondering mode at its current position -
togglePonder
public void togglePonder() -
shutdown
public void shutdown()End the process -
getBestMoves
-
getDynamicKomi
-
isPondering
public boolean isPondering() -
getWinrateStats
-
estimatePassWinrate
public void estimatePassWinrate() -
winrateToHandicap
public static double winrateToHandicap(double pWinrate) Convert winrate to handicap stones, by normalizing winrate by first move pass winrate (one stone handicap). -
addListener
-
removeListener
-
splitCommand
-
isCommandChange
-
isStarted
public boolean isStarted() -
isLoaded
public boolean isLoaded() -
isDown
public boolean isDown() -
supportScoremean
public boolean supportScoremean() -
currentWeight
-
currentShortWeight
-
switching
public boolean switching() -
currentEngineN
public int currentEngineN() -
engineCommand
-
toggleGtpConsole
public void toggleGtpConsole() -
setWeightName
public void setWeightName() -
startWriterThread
public void startWriterThread() -
stopWriterThread
public void stopWriterThread() -
sendToWriterThread
-