Update dependencies and optimize chess move computation

Upgraded various package dependencies in both test and main projects to their latest stable versions. Simplified the chess move computation logic by replacing custom depth handling with a streamlined `go depth` command for improved clarity and maintainability.
This commit is contained in:
Anduin Xue
2025-01-01 15:19:47 +00:00
parent ed70c58800
commit e1ff2b84bc
3 changed files with 14 additions and 15 deletions
@@ -10,12 +10,12 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Aiursoft.AiurObserver.Extensions" Version="8.0.13" />
<PackageReference Include="Aiursoft.AiurObserver.WebSocket.Server" Version="8.0.13" />
<PackageReference Include="Aiursoft.InMemoryKvDb" Version="1.0.6" />
<PackageReference Include="Aiursoft.Scanner" Version="8.0.2" />
<PackageReference Include="Aiursoft.WebTools" Version="8.0.31" />
<PackageReference Include="Aiursoft.AiurObserver.Extensions" Version="9.0.0" />
<PackageReference Include="Aiursoft.AiurObserver.WebSocket.Server" Version="9.0.0" />
<PackageReference Include="Aiursoft.InMemoryKvDb" Version="1.0.7" />
<PackageReference Include="Aiursoft.Scanner" Version="9.0.1" />
<PackageReference Include="Aiursoft.WebTools" Version="9.0.0" />
<PackageReference Include="Gera.Chess" Version="1.1.1" />
<PackageReference Include="LynxChess.Lynx" Version="1.7.0" />
<PackageReference Include="LynxChess.Lynx" Version="1.8.0" />
</ItemGroup>
</Project>
@@ -39,9 +39,8 @@ public class ChessEngine
_engine.AdjustPosition($"position fen {fen}");
var positionClone = new Position(_engine.Game.CurrentPosition);
var depth = difficulty - 1;
var result = _engine.IDDFS(depth, 10);
_engine.Game.ResetCurrentPositionToBeforeSearchState();
return result.BestMove.ToEPDString(positionClone);
return _engine.BestMove(new($"go depth {difficulty}"))
.BestMove
.ToEPDString(positionClone);
}
}