GPBZ2C3DIF64ADOS2NKXYTS6U5DYTARO6RFCZNYZBDCBC2XA4LKAC T2FGWF4FWRAJUWKDLPG4CW2NUWK3WP3HLSOL3OACN5ONHZFRLLGQC CU3XNAGXZHXACBEDPM3THFT6AWAJ4HC5PXZM3Z72WWVMSHPOOXFQC X3FYJUNL5ORLRC7TW3C5OMNZOX4JEWL73RXOQZLRKLAUBVNARIMAC 4B26P4BBEABLLGDY4IQS7QK6OW67EROEIQMHS36D2Z4TWDEK5Z2AC 3QZ5Y55BFUIRG5HZNURRD5Y5SY3VD5CYEZEXCZHBIDEME6MIQQBQC UUI7ECK3K4GHZIJU6JU4WNKWIFAH7CMP4ZG5KQYLZH6YQMJXLCVAC HSGLIJUNOPRWGA53IQNV7G2BOOPHI23WVYJSF5RE3HLEL63Z3OHQC A46B5KNQFPTZEIL2JZKD2CQELGU3COE6FGTV2ABS5U7DVTVDGEBQC FRUDIRWXGFOZERET3DNUNAZ5HSA3G32JZX6WMIXNGZOACTTCRIQAC XRCSCQWQKVYASIMAJO7JVUJXHXE44FZROCJPBW2BR7EE4RPEIBKAC J3BT4EXSBCDHSZDYYWZHEBGQLKODRKPLUOFRCAT7VNPWWPAUXSHQC RNEXG5IFDKMHSUR6RMNTI3Y32ORLVMZ6UJYKHLV2XBMT2QONBTVQC }
} else {if (input.len >= 9) {if (std.mem.eql(u8, input[0..9], "setoption")) {// setoption name Hash value <val>if (std.mem.containsAtLeast(u8, input, 1, "Hash")) {const start = std.mem.lastIndexOfLinear(u8, input, " ") orelse continue;engine_options.hash_size =std.fmt.parseUnsigned(usize, input[start + 1 ..], 10) catch {std.log.debug("unable to parse Hash size: `{s}`", .{input[start..]});continue;};if (engine_options.hash_size < MIN_HASH_SIZE) {engine_options.hash_size = MIN_HASH_SIZE;} else if (engine_options.hash_size > MAX_HASH_SIZE) {engine_options.hash_size = MAX_HASH_SIZE;}std.log.debug("Hash size set to {d}", .{engine_options.hash_size});}}}
if (input.len >= 8) {if (std.mem.eql(u8, input[0..8], "position")) {try parsePosition(&gs, input);// std.log.debug("clearing transposition table", .{});// search.?.tt.clear(); // XXX: is this really necessary?gs.show();
if (input.len >= 8) {if (std.mem.eql(u8, input[0..8], "position")) {try parsePosition(&gs, input);gs.show();}
if (input.len >= 3) {if (std.mem.eql(u8, input[0..3], "uci")) {if (std.mem.eql(u8, input, "ucinewgame")) {std.log.debug("initializing new uci game", .{});if (search != null) {std.log.debug("clearing transposition table", .{});search.?.tt.clear();
if (input.len >= 3) {if (std.mem.eql(u8, input[0..3], "uci")) {if (std.mem.eql(u8, input, "ucinewgame")) {std.log.debug("initializing new uci game", .{});if (search != null) {std.log.debug("clearing transposition table", .{});search.?.tt.clear();}std.log.debug("empty moves history", .{});gs.history.clearRetainingCapacity();try parsePosition(&gs, "position startpos");std.log.debug("new uci game initialized", .{});} else {try hello();
std.log.debug("empty moves history", .{});gs.history.clearRetainingCapacity();try parsePosition(&gs, "position startpos");std.log.debug("new uci game initialized", .{});} else {try hello();
if (input.len >= 2) {if (std.mem.eql(u8, input[0..2], "go")) {if (search == null) {std.log.err("search is not initialized, call isready first!", .{});continue;
if (input.len >= 2) {if (std.mem.eql(u8, input[0..2], "go")) {if (search == null) {std.log.err("search is not initialized, call isready first!", .{});continue;}const srch = try std.Thread.spawn(std.Thread.SpawnConfig{},parseGo,.{ &search.?, input },);srch.detach();