Monday, February 6, 2012

Another silly bug, no need to rush man!

 While fixing the PopCnt code I made some copy & paste without modifying, shame on me!

Another binary deployed, let's hope this is it

ChessKISS 1.5b is ready for downloading...

Sunday, February 5, 2012

CPU hunter...

 I've uploaded a new version the binary, with a tiny change that reduces notably the CPU usage just introducing a Sleep(1) in the main function:

var
  engine: TChessEngine;
  think: TMoveStatus;

begin
  //ReportMemoryLeaksOnShutdown := True;

  engine := TChessEngine.Create;
  try
    WriteLn('ChessKISS');
    WriteLn('version ' + GAME_VERSION + ' ' + RELEASE_DATE);
    {$IFDEF WIN32}
    WriteLn('32 bits');
    {$ELSE}
    WriteLn('64 bits');
    {$ENDIF}
    WriteLn;
    WriteLn('Type "help" for a list of available commands');

    repeat
      Sleep(1);  //here goes the change

      think := engine.Think;
      if think in [msCheckmate, msStalemate, msWithdraw, ms50MovesRule, msThreefoldRep] then
      begin
        engine.SaveAperture(think);
        engine.SendDataToWinboard(think, '');
        engine.Clear;
      end;

      if engine.GameStatus = gsQuit then
        Break;

    until False;
  finally
    engine.Free;
  end;
end.

Thanks Graham for pointing it out!

Saturday, February 4, 2012

BB Framework

 I've also updated the framework to 1.2b  in order to be able to compile the project

ChessKISS 1.5a, maintenance version...

It seems that I took for grant that everybody have SSE4 :-), that's why I didn't have any issue, time to deploy the patch!

What's new?

 04/02/12, 1.5a maintenance version

-Board
  The engine now checks if PopCnt is available (that stop the engine crashing on machines with no SSE4)
  The endings are not longer based on strings but on hash

-Cache
  beta hits updated the history entries

-MoveGenerator
  CanTraverse() tweek a bit, it could discard valid moves

-PV
  New unit, not used yet

-Search
  Killers updated when a bet cache is hit

OMG!, buggy 1.5

 For whatever strange reason ChessKISS 1.5 does not work, it returns "draw by repetition" all the time...

Shame on me, I don't know what's wrong because in my computer it works perfectly, so far what I've seen is that the search thread is signal as ready when really is not, I haven't modify that part of code and is just TFuture<T> nothing complicated, well today is time for remote debugging