1
0
Fork 0
Commit Graph

64 Commits (4c294932e7b4a6ee3604f0c176dd01124524456f)

Author SHA1 Message Date
Marco Costalba 4c294932e7 Better document null move dynamic reduction
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-15 22:18:56 +01:00
Marco Costalba c831b00544 Introduce beta counters to order moves at ply one
Instead of number of searched nodes use the number of
opponent beta-cutoff occurred under the move subtree.

After 570 games 1+0 we have: +150 =288 -132 (+11 ELO)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-15 22:13:42 +01:00
Marco Costalba 5b853c9be6 Debugging: move debug function definitions in misc.cpp
Also activate writing on log file.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-14 17:26:05 +01:00
Marco Costalba 8ee3124487 Fix two bugs in ok_to_prune() (2)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-12 22:27:43 +01:00
Marco Costalba 07b45151d2 Disable "Null driven IID" by default
Testing is not clear. Probably we need to test
at deeper depths to have some clear results.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-11 20:39:08 +01:00
Marco Costalba 9e3ab9099f Null move only for depth > OnePly
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-11 20:38:52 +01:00
Marco Costalba f09884d72f Null driven IID: remove IIDMargin from see() condition
This seems to cut searched nodes also more.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-10 21:43:09 +01:00
Marco Costalba 8d86c87e1e Add "Null driven IID" UCI option (default true)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-08 10:57:40 +01:00
Marco Costalba c172af1b61 Null move driven internal iterative deepening
When a null move fails low due to a capture, try
to detect if without the capture we are above beta,
in this case there is a good possibility this is
a cut-node and the capture is just a null move
artifact due to side to move change. So if we still
don't have a TT move it's a good time to start an IID.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-08 10:46:52 +01:00
Marco Costalba b4fcfed55b Null capture pruning
Null move can fail low because of a capture artifact due
to the side to move change. Try to detect this condition
and fail high instead.

This pruning is very powerful, around 7% of nodes, but is
still experimental so is disabled by default.

Set UseNullCapturePruning to true to enable.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-06 11:31:14 +01:00
Marco Costalba d95b9189d8 Revert opponent time advantage logic
Strength increase was due to an hidden bug introduced
by the patch, namely the time per move to /30 instead
of /40 (see previous patch).

After testing this feature do not add any substantial
increase so is removed.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-30 19:23:33 +01:00
Marco Costalba 20a2ca366f Tweak allocated time per move
It seems better to give more time in middle game then
at the end.

Also Toga uses the same limit.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-25 20:41:06 +01:00
Marco Costalba c3ba5fb9d3 Rewrok the extendeable patch
Cleanup and document.

The real functional change is that not mate threat
moves are never pruned, as could happen before.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-25 20:40:49 +01:00
Marco Costalba ee9f650242 Use extendable instead of depth extension
We can have depth(0) also in problematic cases
according to how extensions are tweaked by the user.

In any case we don't want to prune these moves.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-25 20:40:12 +01:00
Marco Costalba 1867785231 Introduce depth limited benchmarking
Also print some more info.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-22 11:02:05 +01:00
Marco Costalba 1d525bb45f qsearch: restore pruning of pv nodes with negative SEE
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: unknown <Marco@.(none)>
2008-11-19 22:15:14 +01:00
Marco Costalba da7d872eda Fix Intel warnings and init_search_stack argument
Should be a reference not a copy!

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-16 12:46:12 +01:00
Marco Costalba 7daaf03b39 Add and use update_killers()
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-16 12:37:48 +01:00
Marco Costalba 2e778445d5 Add and use move_is_killer() helper
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-16 12:37:48 +01:00
Marco Costalba 93bc05cf69 Convert killers to a vector
Add infrastructure to threat killer moves as a vector,
this will allow us to easily parametrize the number of
killer moves, instead of hardcode this value to two as is now.

This patch just add the infrastructure, no functional
change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-16 12:37:47 +01:00
Marco Costalba a7227ac26f qsearch: do not prune pv nodes with negative SEE
Also small micro-optimization, take a line out of
the moves loop.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-16 12:37:47 +01:00
Marco Costalba 20d7197a9b MovePicker: use EvalInfo to skip generating captures
When we know already no captures are possible in a given
position.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-16 12:37:46 +01:00
Marco Costalba 2d4e2bc62a Fix in ok_to_history(): castle move is not a capture
It is erroneusly considered a capture because king
moves on the same square of the rook.

Use the correct function Position::move_is_capture()
instead of the open coded (and buggy) one.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-10 19:19:40 +01:00
Marco Costalba cdf1f23bc5 Micro optimization of update_history()
Remove an useless comparison.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-10 19:19:40 +01:00
Marco Costalba e86468cc63 Use cut-off checks in qsearch as killer moves
Killers should not be captures, but checks are not
and are produced also in qsearch.

Use this information, will be useful for move ordering.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-10 19:19:40 +01:00
Marco Costalba e7bad2687a Smaller null move reduction when depth is high
Lower probability to miss something important.

It seems to increase strenght. Idea form Cyclone.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-10 19:19:39 +01:00
Marco Costalba 3f610e2b13 Introduce LastIterations variable
Is set during the last iteration.

Sometime also during the second last.

During the last iteration is set in the 95% of cases.

During the second last is set in the 40% of cases.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-10 19:19:39 +01:00
Marco Costalba 8097e99c69 Stockfish 1.0
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-02 15:35:32 +01:00
Marco Costalba 55b6464d40 search: micro optimization
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-02 15:00:28 +01:00
Marco Costalba 6e5cf2f3c5 Revert "Relax time constraints"
Does not seem to give an improvment, acutually it seems
a totally neutral change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-01 12:46:53 +01:00
Marco Costalba e5ebd4f5d1 Partially space inflate search.cpp
Space inflate main remaining functions in search.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-01 12:46:53 +01:00
Marco Costalba cf2bafb661 Relax time constraints
Allow a seacrh to take a bit more time if needed.

This reduces the chanches of wast all the search time
for the last iteration and also allow to start the last
iteration when we have less time remaining.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-01 12:46:53 +01:00
Marco Costalba 7d717df4e4 Revert "Last minute surprise" for now
It defenitly needs more testing. Just postponed.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-01 12:46:52 +01:00
Marco Costalba 74fd57220e Refine "few moves" in "last minute surprise"
It seems that "few moves" works because we extend the good
captures at the last ply of PV, so code it directly.

This version seems defenitly stronger then previous one.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-11-01 12:46:51 +01:00
Marco Costalba 0936a96a0e Space inflate extension() code
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-26 21:30:21 +01:00
Marco Costalba 13d1776a98 TEST: extend when few moves available
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-26 21:30:21 +01:00
Marco Costalba 5dc2312121 Update copyright info
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-20 21:47:20 +02:00
Marco Costalba d8268024a9 Implement Last Seconds Noise (LSN) filtering
When an engine is in deep trouble at few
seconds from time limit then giveup without
fighting anymore.

This is used to reduce "lucky draws" and time pressure
blunders noises that can obfuscate results during tests
blitz games (typical one minute games).

Goal of this technique is to reduce number of matches
needed to reliably prove then an engine A is stronger
then an opponent B.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-13 20:40:48 +02:00
Marco Costalba 4fa5dd4db5 Add a second margin to razoring
Razor on ply one if the advantage is more then a pawn,
the only way to gap the advantage is to capture, so
go directly in quiesce.

This seems to have a positive effect.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-13 20:40:47 +02:00
Marco Costalba a6017aa728 Add mean calculation in debug tools
Another simple performance counter...

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-11 19:25:16 +02:00
Marco Costalba 6a15df1d82 Revert bad capture pruning
After testing does not seem to increase ELO.

Indeed Glaurung is a little bit weaker, so revert.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-11 19:03:59 +02:00
Marco Costalba bbf7a94d76 Better interface to get the current move type
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-06 05:44:23 +02:00
Marco Costalba a3477af2a1 Allow to prune bad captures
Only good capture are preserved from futility pruning
and LMR reducing.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-10-06 05:44:23 +02:00
Marco Costalba 7dd0c39714 Warnings termination fest
A bunch of Intel C++ warnings removed, other silent out.

Still few remaining but need deeper look.

Also usual whitespace crap removal noise.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-09-24 00:32:53 +02:00
Marco Costalba 060eef4f4e Do not use evaluate() for razoring
Because razoring is reached 10% of times and about 50% of time
first two conditions are met we can save 5% of calls to the fairly
costly evaluate().

On the other side statistics have shown 95% of nodes that pass
the first two razoring conditions pass also the evaluate() test.
So the risk of dropping the third condition seems low enough.

Testing seems to validate this.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-09-23 23:36:51 +02:00
Marco Costalba 2dbc8feae3 Finally remove last old C style I/O stuff
Now I/O is fully done with C++ iostreams.

The only exception is in non-windows version
of Bioskey() in misc.cpp

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-09-20 06:53:06 +02:00
Marco Costalba 5c4f6f6226 Cleanup poll()
Reshape this function in preparation
for future work.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-09-18 12:27:09 +02:00
Marco Costalba 18860cce40 Improve time managment
If we need some more and we are in time
advantage take it.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-09-18 12:27:09 +02:00
Marco Costalba d583176baf Pass also opponent time to think()
This patch modifies think() signature to accept
also opponent time. This is needed for future
changes to time managment.

Still no functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-09-18 12:27:09 +02:00
Marco Costalba 5080e72ea5 Prefer strncpy() to strcpy()
This removes a warning under MSVC++

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-09-18 12:25:55 +02:00