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

Planning strategies part 3 (from week 32) #31

Open
olufjen opened this issue Aug 9, 2021 · 7 comments
Open

Planning strategies part 3 (from week 32) #31

olufjen opened this issue Aug 9, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@olufjen
Copy link
Owner

olufjen commented Aug 9, 2021

The game system contains two knowledgebases:
One parent KB and a Strategy KB.
The strategy KB contains knowledge about possible movements from available posistions:
occupies(WhiteRook2,g1)
REACHABLE(WhiteRook2_g1,h1)
REACHABLE(WhiteRook2_g1,f1)
occupies(WhiteRook2,f1)
REACHABLE(WhiteRook2_f1,h1)
REACHABLE(WhiteRook2_f1,g1)

Create a class Performance that is responsible for calculating the performance measure.

@olufjen olufjen added the enhancement New feature or request label Aug 9, 2021
@olufjen
Copy link
Owner Author

olufjen commented Aug 12, 2021

Tasks:
Rebuild the ChessFolKnowledgebase to be used for all knowledgebases.
Move all possible inference methods to this class.
Create a Performance class to contain and maintain the performance measure:
Part of a performance measure:
The number of pieces that protect a position.
The rank of these pieces.
Can I take any opponent piece with a given move (from a given position?)

@olufjen
Copy link
Owner Author

olufjen commented Aug 23, 2021

All available positions after the closest opponent piece must be put in the removed list.
This is not applicable for Knights and pawns.

@olufjen
Copy link
Owner Author

olufjen commented Sep 6, 2021

The PreferredMove processor must be reworked:
Checks the removed positions!!:
Piece name WhiteBishop1: This is found in file preferredmoveB13!!
rnbq1rk1/ppp11pp1/111b1n1p/111p1111/111P1111/11NBPN11/PP111PPP/R1BQ1RK1
Piece position c1 X, Y (2, 0) wB c1 BISHOP ActiveName B
Available positions
Position: b2 B X, Y (1, 1) Occupied by: WhitePawn2
Position: a3 B X, Y (0, 2)
Position: d2 B X, Y (3, 1)
Position: e3 B X, Y (4, 2) Occupied by: WhitePawn5
Position: f4 B X, Y (5, 3)
Position: g5 B X, Y (6, 4)
Position: h6 B X, Y (7, 5) Occupied by: BlackPawn8: This position is not removed!!!
This is because it contains an opponent piece

Removed positions
Position: b2 B X, Y (1, 1) Occupied by: WhitePawn2
Position: e3 B X, Y (4, 2) Occupied by: WhitePawn5
Position: a3 B X, Y (0, 2)
Position: f4 B X, Y (5, 3)
Position: g5 B X, Y (6, 4)
Position: d2 B X, Y (3, 1)
Northwest positions
X, Y (1, 1) X, Y (0, 2)
Northeast positions
X, Y (3, 1) X, Y (4, 2) X, Y (5, 3) X, Y (6, 4) X, Y (7, 5)
Southeast positions

@olufjen
Copy link
Owner Author

olufjen commented Sep 8, 2021

From the example game:
We must find the min position in all directions.
For white bishop 1 at c1:
The min position is b2 in NW direction, but the min position in NE direction is e3.
The procedure for finding all removed positions for Bishop is moved to the ABishop class

@olufjen
Copy link
Owner Author

olufjen commented Sep 14, 2021

See above comment:
Make similar procedures for the ARook class and the AQueen class

@olufjen
Copy link
Owner Author

olufjen commented Sep 27, 2021

OBS: In the recordings of preferred moves for each piece:
The positions of friendly pieces are correct after the next move by the opponent.

@olufjen
Copy link
Owner Author

olufjen commented Sep 27, 2021

After rework of PreferredMove processor:
whiterook

This is now solved:
The PreferredMoveProcessor has been reworked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant