Skip to content

Commit

Permalink
Update README.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
fshi3 authored May 3, 2022
1 parent 1d7dc23 commit d6e92f0
Showing 1 changed file with 8 additions and 48 deletions.
56 changes: 8 additions & 48 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,8 @@
\margl1440\margr1440\vieww10800\viewh9300\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0

\f0\fs28 \cf0 FOREST SHI\
fshi3\
\

\b Questions
\b0 \

\b Did you do part one?
\b0 \
YES\
\

\b Where are the abstract elements based on the formal model of the game defined?\
\b abstract elements based on the formal model of the game.\

\b0 The states are stored in the class gameBoard.java in a 2D array.\
The all possible actions in a particular state is return by the method actions() in class gameBoard.java\
Expand All @@ -27,7 +16,7 @@ Goal states are evaluated by the method isGoalState() in class miniMaxAI.java, w
The initial state is an empty board and is the default when class gameBoard.java is initialized.\
\

\b Where are the specific implementations of those elements for m x n x k Connect-Four defined?\
\b Specific implementations of those elements for m x n x k Connect-Four\

\b0 States are stored in class gameBoard.java, as the variable board[][].\
Applicable actions are return as integer values in an ArrayList by actions() method in class gameBoard.java.\
Expand All @@ -36,61 +25,32 @@ Goal states are evaluated by the method isGoalState() in class miniMaxAI.java, w
The initial state is an empty board and is the default when class gameBoard.java is initialized. The variable board[][] in gameBoard.java is set very value in the 2D array to \'93 \'93 or empty String.\
\

\b Where is your implementation of the MINIMAX algorithm?
\b MINIMAX algorithm
\b0 \
minimax algorithm is in miniMaxAI.java. The correct move is returned by the methods miniMax_decision().\
\

\b What class or file do we run to run your 3x3x3 game?\
\b How to run a 3x3x3 game?\

\b0 Run the file Game.java, in the main method, it will create an instance of class Game.java and it will prompt you to choose which game to play. choose 3x3x3 and it will play the 3x3x3 board and it will use miniMaxAI.java as the AI to play for that board size.\
\

\b Does it play quickly and perfectly?\

\b0 Yes\
\

\b Did you do Part 2?\

\b0 Yes\
\

\b Where can we find your implementation of alpha-beta pruning?\
\b0 Heuristic-miniMax algorithm is in H_miniMax.java. The correct move is returned by miniMax_decision().\

\b0 I didn\'92t implement alpha-beta pruning. I just used a heuristic to evaluate non-terminal states and use miniMax with a depth limit cutoff.\
\

\b Where can we find your implementation of H-MINIMAX?\

\b0 H-miniMax algorithm is in H_miniMax.java. The correct move is returned by miniMax_decision().\

\b \
Where can we find the definitions of your heuristic function?\

\b0 heuristics definition is found in the method heuristicVal() in the class H_miniMaxAI.java. The method returns a heuristic value for non-terminal states. It values 4 in row as the highest value, then 3 in a rows, then 2 in a rows. It values states with a win as the highest value. Then it values states with more 3 in a rows and 2 in a rows as higher value then states that have less, and vice versa for the opponent.\
\

\b What class or file do we run to run your 6x7x4 game?\
\b How to run a 6x7x4 game?\

\b0 Run the file Game.java, in the main method, it will create an instance of Game.java and it will prompt the user to choose which game. Choose the 6x7x4 and it will generate that board and use the H_miniMaxAI.java file to run the AI for that game.\
\

\b Comment on how well and how quickly it plays.\

\b0 My game has two depth options - 5 moves or 6 moves ahead. The 5 moves plays reasonably well, but it will blunder in certain situations, however the first move is relatively fast, a second or two, and each successive move gets faster. The 6 moves option plays much better, and will beat me most of the times, however the first move can take up to 5 or 6 seconds, but each successive move gets faster.\
\

\b Java Programmers: Do you have a nice, short, clear main method that creates instances of your other classes and runs the game?\

\b0 Yes\
\
\
\

\b OTHER - HERE ARE ALL OF MY FILES AND WHAT THEY DO
\b0 \
My Connect-4 AI Game Project consists of five total classes: gameBoard.java, Game.java, miniMaxAI.java, H_miniMaxAI.java, and Player.java\
My Connect-4 AI Game consists of five total classes: gameBoard.java, Game.java, miniMaxAI.java, H_miniMaxAI.java, and Player.java\
\

\b Game.java
Expand Down Expand Up @@ -119,4 +79,4 @@ This class represents the human player, stores information about which pieces (R
\

\b \
}
}

0 comments on commit d6e92f0

Please sign in to comment.