mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-20 12:42:18 +01:00
DroidFish: Use different GTB path for network engines and local engines.
This commit is contained in:
@@ -970,6 +970,8 @@ public class DroidFish extends Activity implements GUIInterface {
|
||||
gtbPath = extDir.getAbsolutePath() + sep + gtbDefaultDir;
|
||||
}
|
||||
engineOptions.gtbPath = gtbPath;
|
||||
String gtbPathNet = settings.getString("gtbPathNet", "").trim();
|
||||
engineOptions.gtbPathNet = gtbPathNet;
|
||||
String rtbPath = settings.getString("rtbPath", "").trim();
|
||||
if (rtbPath.length() == 0) {
|
||||
File extDir = Environment.getExternalStorageDirectory();
|
||||
|
||||
@@ -26,6 +26,7 @@ public final class EngineOptions {
|
||||
public boolean rootProbe; // Only search optimal moves at root
|
||||
public boolean engineProbe; // Let engine use EGTB
|
||||
public String gtbPath; // GTB directory path
|
||||
public String gtbPathNet; // GTB directory path for network engines
|
||||
public String rtbPath; // Syzygy directory path
|
||||
public String networkID; // host+port network settings
|
||||
|
||||
@@ -36,6 +37,7 @@ public final class EngineOptions {
|
||||
rootProbe = false;
|
||||
engineProbe = false;
|
||||
gtbPath = "";
|
||||
gtbPathNet = "";
|
||||
rtbPath = "";
|
||||
networkID = "";
|
||||
}
|
||||
@@ -47,6 +49,7 @@ public final class EngineOptions {
|
||||
rootProbe = other.rootProbe;
|
||||
engineProbe = other.engineProbe;
|
||||
gtbPath = other.gtbPath;
|
||||
gtbPathNet = other.gtbPathNet;
|
||||
rtbPath = other.rtbPath;
|
||||
networkID = other.networkID;
|
||||
}
|
||||
@@ -63,6 +66,7 @@ public final class EngineOptions {
|
||||
(rootProbe == other.rootProbe) &&
|
||||
(engineProbe == other.engineProbe) &&
|
||||
gtbPath.equals(other.gtbPath) &&
|
||||
gtbPathNet.equals(other.gtbPathNet) &&
|
||||
rtbPath.equals(other.rtbPath) &&
|
||||
networkID.equals(other.networkID));
|
||||
}
|
||||
|
||||
@@ -206,8 +206,8 @@ public class NetworkEngine extends UCIEngineBase {
|
||||
hashMB = engineOptions.hashMB;
|
||||
setOption("Hash", engineOptions.hashMB);
|
||||
if (engineOptions.engineProbe) {
|
||||
gaviotaTbPath = engineOptions.gtbPath;
|
||||
setOption("GaviotaTbPath", engineOptions.gtbPath);
|
||||
gaviotaTbPath = engineOptions.gtbPathNet;
|
||||
setOption("GaviotaTbPath", engineOptions.gtbPathNet);
|
||||
setOption("GaviotaTbCache", 8);
|
||||
syzygyPath = engineOptions.rtbPath;
|
||||
setOption("SyzygyPath", engineOptions.rtbPath);
|
||||
@@ -226,7 +226,7 @@ public class NetworkEngine extends UCIEngineBase {
|
||||
return false;
|
||||
if (hashMB != engineOptions.hashMB)
|
||||
return false;
|
||||
if (hasOption("gaviotatbpath") && !gaviotaTbPath.equals(engineOptions.gtbPath))
|
||||
if (hasOption("gaviotatbpath") && !gaviotaTbPath.equals(engineOptions.gtbPathNet))
|
||||
return false;
|
||||
if (hasOption("syzygypath") && !syzygyPath.equals(engineOptions.rtbPath))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user