Skip to content

Commit

Permalink
organize comments
Browse files Browse the repository at this point in the history
  • Loading branch information
angstrom-123 committed Dec 20, 2024
1 parent 86c3ac2 commit ba0e486
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 21 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.ang</groupId>
<artifactId>Jupiter</artifactId>
<version>1.0.0</version>
<version>1.0.0-alpha</version>

<name>Jupiter</name>
<!-- <url></url> -->
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/ang/Core/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
import com.ang.Core.Moves.Move;
import com.ang.Core.Moves.MoveList;

// TODO: bugfix - engine can sometimes move player's pieces
// TODO : bugfix - engine can sometimes move player's pieces

// TODO : bugfix - player can sometimes move into attacked squares
// - eg, rook blocks off a rank, king can step into it
// - not tracking attacks correctly??

public class Board {
// public
Expand Down Expand Up @@ -171,7 +175,7 @@ private static void updateCRights(BoardRecord rec, Move move, int piece) {
// king moved or in check
for (int pos : rec.kings) {
if (pos == -1) {
continue; // TODO : try with break
continue;
}
if ((rec.board[pos] & 0b11000) == Piece.WHITE.val()) {
if (isInCheck(rec, pos)) {
Expand Down
14 changes: 0 additions & 14 deletions src/main/java/com/ang/Core/BoardRecord.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,6 @@ public void posArrAdd(int piece, int pos) {
return;
}

// TODO : bugfix
// -1 OOB of arr len 4
// at quiesce for engine evaluating a bishop move to an empty square
// depth: 1 eval: 595.0 from: 8 to: 0 - 1
// depth: 1 eval: 610.0 from: 5 to: 14 - 2
// depth: 1 eval: 615.0 from: 28 to: 34 - 3
// depth: 1 eval: 620.0 from: 2 to: 1 - 4
// depth: 2 eval: 615.0 from: 8 to: 0 - 1
// depth: 2 eval: 630.0 from: 5 to: 14 - 2
// depth: 2 eval: 745.0 from: 5 to: 23 - 3
// depth: 3 eval: 605.0 from: 8 to: 0 - 1 - next in line could be 5 - 14 : bishop to empty
// Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 4
// at com.ang.Util.BoardRecord.posArrAdd(BoardRecord.java:215)

movingArr[movingArrEnd] = pos;
allPieces[allPiecesEnd++] = pos;
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/ang/Engine/Search.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public class Search {
private int engineCol;
private int playerCol;

private boolean useAlphaBeta = true;
private boolean useMoveOrdering = true;
private boolean useTTable = true;
private boolean useAlphaBeta = true;
private boolean useMoveOrdering = true;
private boolean useTTable = true;

private TranspositionTable tTable = new TranspositionTable();
private TranspositionTable tTable = new TranspositionTable();

public Search(int searchTime, Piece col, boolean ab, boolean mo, boolean tt) {
this(searchTime, col.val());
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/ang/Engine/TranspositionTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

import java.util.HashMap;

// TODO : add limit on table size, cull extremely outdated transpositions

public class TranspositionTable {
public int size = 0;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/ang/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import com.ang.Graphics.Renderer;
import com.ang.Util.GameInterface;

// TODO : implement checkmate

public class Game implements GameInterface {
private int squareSize;
private double renderScale;
Expand Down

0 comments on commit ba0e486

Please sign in to comment.