File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2099,19 +2099,24 @@ end
20992099---- ----------------------------------------------------------------------------
21002100
21012101function M :GetEloRange ()
2102- return { 1400 , 2200 }
2102+ return { 1100 , 2200 }
21032103end
21042104
21052105function M :GetAverageCpuTime (elo )
21062106 -- Estimated CPU time in ms based on ELO (deeper search at higher ELO)
21072107 -- Always faster than sunfish and fruit
21082108 -- Faster than zugzug at depth 4+, slower at depths 1-3
2109+ local factor = 1
2110+ if elo >= 1800 then
2111+ factor = 3
2112+ end
2113+
21092114 local range = self :GetEloRange ()
21102115 local t = (elo - range [1 ]) / math.max (1 , range [2 ] - range [1 ])
21112116 -- At low ELO (depth 1-3): ~200ms (slower than zugzug at depths 1-3)
21122117 -- At high ELO (depth 4+): ~700ms (faster than zugzug at depth 4)
21132118 -- Always faster than sunfish/fruit
2114- return 200 + t * 500 -- 200ms to 700ms
2119+ return 200 + t * 500 * factor -- 200ms to 700ms
21152120end
21162121
21172122--- Map state.elo to search depth (weaker = shallower, stronger = deeper). Uses state.ply_limit when set.
Original file line number Diff line number Diff line change 804804-- Engine interface
805805---- ----------------------------------------------------------------------------
806806function M :GetEloRange ()
807- return {1200 , 2000 }
807+ return {600 , 1500 }
808808end
809809
810810--- Node limit from state.node_limit when set, else from state.elo.
@@ -828,10 +828,10 @@ function M:GetAverageCpuTime(elo)
828828 local nodeCount = 500 + t * 3500
829829 if nodeCount < 2000 then
830830 -- Below 2000 nodes: sunfish is faster, so lower time
831- return math.floor (250 + t * 250 ) -- 250ms to 450ms
831+ return math.floor (400 + t * 250 ) -- 250ms to 450ms
832832 else
833833 -- Above 2000 nodes: fruit is faster, so sunfish time increases more
834- return math.floor (450 + (t - 0.43 ) * 1300 ) -- 450ms to 1300ms
834+ return math.floor (600 + (t - 0.43 ) * 1800 ) -- 450ms to 1300ms
835835 end
836836end
837837
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ function M:GetAverageCpuTime(elo)
2929 -- depth 1: ~40ms, depth 2: ~150ms, depth 3: ~600ms, depth 4: ~2800ms
3030 -- At depth 4, zugzug becomes slower than garbochess at equivalent ELO
3131 if elo <= 400 then return 40 end -- depth 1 (faster than garbochess)
32- if elo <= 700 then return 150 end -- depth 2 (faster than garbochess)
33- if elo <= 850 then return 600 end -- depth 3 (faster than garbochess)
32+ if elo <= 700 then return 600 end -- depth 2 (faster than garbochess)
33+ if elo <= 850 then return 800 end -- depth 3 (faster than garbochess)
3434 return 2800 -- depth 4 (slower than garbochess at equivalent ELO)
3535end
3636
You can’t perform that action at this time.
0 commit comments