bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] calculate_half_inputs - potential speed up


From: Øystein Schønning-Johansen
Subject: Re: [Bug-gnubg] calculate_half_inputs - potential speed up
Date: Tue, 29 Jul 2014 18:52:40 +0200

Hmmmm.....

What about having a cache of each half board. If we calculate a (or keep a running and updated) hash value for each half board. at entry of calculate half inputs it checks the cache table. Of course this hash table can not have many enteries, as it probably will have to store 125 float values, but having, say 16 entries in the table may have some effect.

best regards,
-Øystein


On Tue, Jul 29, 2014 at 4:35 PM, Ian Shaw <address@hidden> wrote:

Hi guys,

 

As I was pondering how gnubg evaluates positions, I realised that most of the time, the opponent’s board layout is the same whatever move the player makes.  There are only likely to be a couple of changes, when chequers are hit. If the opponent fails to enter from the bar, the position could even repeat across moves.

 

The results of calculate_half_inputs for the opposing side could therefore be re-used for many positions, which could lead to a saving in processing if they are cached. Is this done at present? Or would checking for a cache entry itself take up too much time?

 

Regards,

Ian Shaw

 


_______________________________________________
Bug-gnubg mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-gnubg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]