DanielBarton446 / ShogiAI

Simple Shogi AI to be created using Alpha Beta Pruning and additional optimizations
1 stars 0 forks source link

Selective Deepening Generators #11

Open DanielBarton446 opened 2 years ago

DanielBarton446 commented 2 years ago

Since we will be looking at a subset of all possible moves, we need to create a method which prunes all legal moves to moves that have the qualifications we are looking for.

Thus, I am expecting that we create some method something along the lines generate_qualifying_moves() which will return a list of candidate moves we are allowing our alpha beta pruning to operate under.

Note: this should be done in a specific order of precedence. According to a paper, the following should be the order (for these generators):

  1. Capturing pieces that the opponent just played
  2. A Killer move (???) Paper on Killer Moves
  3. Responding to opponent attacking moves (prevent attacks from coming to fruition)
  4. Attacking moves
  5. Defensive moves
DanielBarton446 commented 2 years ago

Note: We should return a generator rather than a list. Since we will only need to look at each move once, by creating a generator, we save a ton of memory. Look into python Yield. Additionally, look at generate_legal_moves() within __init__.py