Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluators symmetry 293 #316

Merged
merged 95 commits into from
Aug 5, 2019
Merged
Changes from 1 commit
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
5343bc7
Mobility symmetry red test.
lrozenblyum Feb 25, 2019
aa3bd0e
Mobility evaluator: symmetry introduced.
lrozenblyum Feb 25, 2019
cd30290
Refactoring + doc updated.
lrozenblyum Feb 25, 2019
8104b53
Red test for normalized range keeping.
lrozenblyum Feb 25, 2019
5bd9a26
Mobility evaluator: estimate the advantage in complex way.
lrozenblyum Feb 25, 2019
ea64afd
Refactoring: extracted symmetrical normalized range.
lrozenblyum Feb 25, 2019
3bb6180
Documentation + range reused
lrozenblyum Feb 25, 2019
667d932
Refactoring: constant convention
lrozenblyum Feb 25, 2019
4f0c967
Center control evaluator: symmetry red test
lrozenblyum Feb 26, 2019
5380c38
Center control evaluation: based on index
lrozenblyum Feb 26, 2019
c968b22
Normalized range: red test
lrozenblyum Feb 26, 2019
249cda9
Center control evaluator - normalization enforced
lrozenblyum Feb 26, 2019
6f59063
Clean up
lrozenblyum Feb 26, 2019
200c161
Refactoring: asserts generalized
lrozenblyum Feb 26, 2019
f9ec3c1
Refactoring: normalized assert used more widely
lrozenblyum Feb 26, 2019
78e0619
Test castling symmetry: force opponent blocks
lrozenblyum Apr 1, 2019
b6ba5a4
symmetry introduced, however the test is still red.
lrozenblyum Apr 1, 2019
01fec6d
Castling safety evaluator now takes all in-between pieces into account.
lrozenblyum Apr 1, 2019
9100304
Merge branches 'EvaluatorsSymmetry-293' and 'master' of https://githu…
lrozenblyum Apr 2, 2019
1fefa30
Test that will require normalized range guarantees from
lrozenblyum Apr 2, 2019
696b1e3
Refactoring: moved castling safety evaluator to normalized package.
lrozenblyum Apr 2, 2019
f7fbb83
Guarantee normalized range for castling safety
lrozenblyum Apr 2, 2019
92e32ef
Try to handle Sonar remark
lrozenblyum Apr 2, 2019
28924f2
Refactoring: position enriched by occupied squares method
lrozenblyum Apr 3, 2019
220a34a
Refactoring: reused method inside Position class
lrozenblyum Apr 3, 2019
7401cd7
Castling safety: more symmetry and more correctness
lrozenblyum Apr 8, 2019
db6786a
Test that reveals an old bug: moving one of rooks was encouraged
lrozenblyum Jun 27, 2019
b3dc087
Fixed bug: we were encouraging rook moving to lost castling right.
lrozenblyum Jun 27, 2019
c5829c6
Refactoring: extracted 2-plies evaluator for testability
lrozenblyum Jul 1, 2019
0bc292f
Test that shows illogical behavior of 2-ply thinking of castling safety.
lrozenblyum Jul 1, 2019
47e9f79
Castling safety calculates absolute numbers insetead of relative.
lrozenblyum Jul 1, 2019
3d2b6a8
Test for issue: 2'nd ply evaluator doesn't want castling
lrozenblyum Jul 1, 2019
512f4ef
Fact of castling execution persisted in Position as part of history.
lrozenblyum Jul 2, 2019
28b38cd
Fixed logging that has been incorrect since 2-ply evaluator extraction.
lrozenblyum Jul 2, 2019
1638b91
Prepare Range infrastructure for future reuse
lrozenblyum Jul 2, 2019
f5e2011
Symmetrical normalized range moved to new Range infrastructure
lrozenblyum Jul 2, 2019
bd77b65
Refactoring: Range reused
lrozenblyum Jul 2, 2019
4a74b7b
Javadoc
lrozenblyum Jul 2, 2019
ef44ed7
Cross-reference to the removal ticket
lrozenblyum Jul 2, 2019
940f4c7
Migrated to Parameterized test.
lrozenblyum Jul 2, 2019
b8ebb5c
2-ply evaluator: enforce Normalized constraint.
lrozenblyum Jul 2, 2019
80d937c
Range reused more extensively
lrozenblyum Jul 2, 2019
00a91e7
Refactored length calculation
lrozenblyum Jul 2, 2019
813a9d6
Removed outdated comment: now we can think for > 1 ply
lrozenblyum Jul 3, 2019
9f87e64
Additional center control test coverage
lrozenblyum Jul 3, 2019
42d1998
Test for attack evaluator not taking opponent into account
lrozenblyum Jul 7, 2019
02dc1b1
Attack evaluator respects opponent situation
lrozenblyum Jul 7, 2019
bcbd5b6
Attack evaluator calculates values in normalized range.
lrozenblyum Jul 7, 2019
04ad896
Test to enforce protection evaluator symmetry
lrozenblyum Jul 8, 2019
4a63090
Added test for missing protection evaluator feature:
lrozenblyum Jul 9, 2019
26fc403
Refactoring: introduced separate protection index calculator.
lrozenblyum Jul 9, 2019
df6222d
Draft protection evaluator with symmetry and changed logic.
lrozenblyum Jul 11, 2019
67e4594
Fixed bug in the test
lrozenblyum Jul 11, 2019
ec9229c
Moved test that is now covered by AttackEvaluator to the proper place.
lrozenblyum Jul 17, 2019
bef01de
Moved test that is now covered by AttackEvaluator to the proper place.
lrozenblyum Jul 17, 2019
62ddd1c
Protection evaluator respects fact of multiple pieces protecting one.
lrozenblyum Jul 17, 2019
4df44a6
Protection evaluator: lazy normalization.
lrozenblyum Jul 17, 2019
2ad284e
The more test coverage the better
lrozenblyum Jul 17, 2019
aaa07dc
'Smart' test migrated to 2-ply evaluation.
lrozenblyum Jul 17, 2019
f03235f
Refactoring: comments
lrozenblyum Jul 17, 2019
f498b31
Refactoring: inlined 'index' calculator
lrozenblyum Jul 17, 2019
f244443
Refactoring: inlined 'attack' index calculator
lrozenblyum Jul 17, 2019
fb4cef3
Merge pull request #326 from lrozenblyum/master
lrozenblyum Jul 18, 2019
e471a36
Refactoring
lrozenblyum Jul 22, 2019
10d215e
Refactoring: simplified target result calculation
lrozenblyum Jul 22, 2019
44f5422
Refactoring towards common 'index' concept
lrozenblyum Jul 22, 2019
08c152b
Refactoring: common renaming
lrozenblyum Jul 22, 2019
2b09b2f
Preparing interface for Position+Side analyzing
lrozenblyum Jul 22, 2019
917894e
Refactoring to the new interface
lrozenblyum Jul 22, 2019
f6f01f6
Refactoring: code reuse + preparation for #323
lrozenblyum Jul 22, 2019
d86993a
Refactoring: reused common facility
lrozenblyum Jul 22, 2019
5290a6c
Refactoring: reused common facility
lrozenblyum Jul 22, 2019
4cee654
Refactoring: reused common facility
lrozenblyum Jul 22, 2019
15cfe1d
Refactoring: reused common facility
lrozenblyum Jul 22, 2019
b08b16e
Refactoring: reused common facility
lrozenblyum Jul 22, 2019
efdaf3a
Refactoring: common naming
lrozenblyum Jul 22, 2019
00188fb
Javadoc
lrozenblyum Jul 22, 2019
5e367f0
Refactoring
lrozenblyum Jul 22, 2019
1cc5997
Try to avoid handling terminal positions.
lrozenblyum Jul 24, 2019
e1efa00
Fixed tests that were red due to missing King in the opponent.
lrozenblyum Jul 30, 2019
644d277
Introducing movedSide historical information
lrozenblyum Jul 31, 2019
3e93ae8
Moved side stored correctly for usual moves
lrozenblyum Jul 31, 2019
991131e
Symmetrical test
lrozenblyum Jul 31, 2019
edf5da8
Introduce more historical information about terminal positions
lrozenblyum Jul 31, 2019
e8d01dc
Ensure single-param constructor is not used for terminal positions.
lrozenblyum Jul 31, 2019
c4d3258
Reassurance test for stalemate situation.
lrozenblyum Jul 31, 2019
9a04536
Used historical information about moved side for correct processing.
lrozenblyum Jul 31, 2019
e1c7a5b
Prefer consistency over immutability.
lrozenblyum Jul 31, 2019
18ea1c6
Implemented DenormalizedTest.beSmartALittle.
lrozenblyum Jul 31, 2019
33113de
More precise max estimate for protection evaluator.
lrozenblyum Jul 31, 2019
7b59cfa
Formatting
lrozenblyum Jul 31, 2019
226500c
Symmetry comment
lrozenblyum Jul 31, 2019
1a568a0
Improved Javadoc
lrozenblyum Aug 5, 2019
85c257d
Improved Javadoc, formatting
lrozenblyum Aug 5, 2019
4da86f8
Fixed Javadoc
lrozenblyum Aug 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Test castling symmetry: force opponent blocks
lrozenblyum committed Apr 1, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 78e0619becccdd41699a1909ad7e2f7c9290d85b
Original file line number Diff line number Diff line change
@@ -42,6 +42,19 @@ public void occupyingSpaceToPreventCastlingNotGood() {
asserts.assertFirstBetter( position, noCastlingPrevention, preventCastlingByBlock );
}

@Test
public void occupyingSpaceToBlockOpponentCastlingIsGood() {
final PositionBuilder position = new PositionBuilder()
.add( Side.BLACK, "a8", PieceType.ROOK )
.add( Side.BLACK, "e8", PieceType.KING )
.add( Side.WHITE, "d6", PieceType.KNIGHT );

Move noCastlingPrevention = new Move( "d6", "e4" );
Move preventCastlingByBlock = new Move( "d6", "c8" );

asserts.assertFirstBetter( position, preventCastlingByBlock, noCastlingPrevention );
}

@Test
public void shouldRookMoveOKGivenCastlingDone() {
PositionBuilder position = new PositionBuilder();