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

Week 26 (June 28) Planning strategies: #29

Open
olufjen opened this issue Jun 28, 2021 · 4 comments
Open

Week 26 (June 28) Planning strategies: #29

olufjen opened this issue Jun 28, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@olufjen
Copy link
Owner

olufjen commented Jun 28, 2021

Planning strategies:
For all my actions:
Give the piece of this action a new position from the list of available and not removed positions.
(produceLegalMoves)
the use the player to calculate all removed positions
(calculatePreferredPosition).
Then find which opponent pieces I can take.
And find which of my own pieces I protect

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

olufjen commented Jun 29, 2021

Fails after 15 moves:
0 - -
1 d4 d5
2 c4 Nf6
3 Nc3 e6
4 Nf3 Bd6
5 cxd5 o-o
6 e3 h6
7 Bc4 exd5
8 o-o dxc4
9 h3 Nc6
10 h4 h5
11 d5 Ne5
12 Nd4 Nxd5
13 Nxd5 Be6
14 Nc3 a6
15 a3 -

Caused by: java.lang.NullPointerException
at no.chess.web.model.PlayGame.proposeMove(PlayGame.java:309)
The chess agent returns no action

@olufjen
Copy link
Owner Author

olufjen commented Jun 29, 2021

From the temporary knowledge base:
occupies(WhiteKing,f1)
REACHABLE(WhiteKingf1,g1)
REACHABLE(WhiteKingf1,g2)
REACHABLE(WhiteKingf1,e1)
REACHABLE(WhiteKingf1,e2)

These facts tell that we can reach certain positions given that we occupy f1

@olufjen
Copy link
Owner Author

olufjen commented Jun 29, 2021

The prepareAction method must be reworked.

@olufjen
Copy link
Owner Author

olufjen commented Jul 1, 2021

Add to the result knowledge base:
which positions are occupied by opponent pieces.
Then:
Which position is occupied by the opponent king?
Which position is occupied by the opponent queen?
Which position is occupied by the opponent rooks?
Can I reach any of these positions?
Can I reach any of these positions if I move a piece to a reachable position?

@olufjen olufjen changed the title Week 26 (June 28) Week 26 (June 28) Planning strategies: Jul 5, 2021
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