Repository navigation
Kłak v1.2.0
Kłak v1.2.0
Novità
- Una mossa c'è sempre. Anche con tempo quasi zero o negativo, Kłak cerca almeno a profondità 1 e risponde con una mossa legale. Prima, in quei casi, rispondeva
bestmove 0000, che in partita vuol dire perdere. go movetime. Kłak capisce il comando "pensa tanti millisecondi per questa mossa" e usa metà del tempo indicato, per stare tranquillo sui limiti.- Incremento di tempo. Con
wincebincKłak usa parte dell'incremento (in un 3+2, ogni mossa aggiunge 2 secondi), con un tetto di metà del tempo rimasto. - Comando
gopiù sicuro. Un tempo scritto male o mancante non chiude più il programma: si usa un tempo di partenza di 2 secondi. - Codice più semplice. Una sola funzione,
leggi_numero, legge i numeri del comandogo, e l'impronta della posizione per le ripetizioni si legge dalla storia invece di essere ricalcolata.
La forza di gioco non è stata misurata di nuovo: la ricerca dà gli stessi nodi della v1.1.0 alla stessa profondità.
Limiti noti: la pv è di una sola mossa, position fen non è supportato e il tempo viene controllato solo tra una profondità e l'altra, non dentro la ricerca.
Kłak è un progetto didattico, scritto in Rust imparando passo dopo passo.
What's new
- There is always a move. Even with almost no time left, or negative time, Kłak searches at least depth 1 and returns a legal move. Before, in those cases it answered
bestmove 0000, which loses the game. go movetime. Kłak understands "think for this many milliseconds for this move" and uses half of it, to stay safe.- Time increment. With
wincandbincKłak uses part of the increment (in a 3+2 game, every move adds 2 seconds), capped at half of the remaining time. - Safer
gocommand. A missing or badly written time no longer crashes the program: it falls back to a default of 2 seconds. - Simpler code. One function,
leggi_numero, reads the numbers of thegocommand, and the position hash used for repetitions is read from the history instead of being recomputed.
Playing strength has not been measured again: the search gives the same nodes as v1.1.0 at the same depth.
Known limits: the PV is a single move, position fen is not supported, and time is checked only between depths, not inside the search.
Kłak is a learning project, written in Rust step by step.