Question: Cerate an AI playing Agent (really just a simple class file) to play the Greed Numbers Gamebased on the trivial implementation of the game I
Cerate an AI playing "Agent" (really just a simple class file) to play the Greed Numbers Gamebased on the trivial implementation of the game I have provided. The Agent's goal is to simply this get the highest score possible on a arbitrarily large grid.
You may employ whatever techniques you choose in any combination. For example:
Heuristic decision making
Breadth first search
Depth first search
Branch and Bound
Alpha-Beta Pruning
Iterative Deepening (IDA*)
Recursive Backtracking
Some clever trick that I haven't even mentioned or probably even thought of (it's AI after all).
If you were feeling REALLY ambitious, you could even try using third party Neural Network libraries such as:
Google's Tensor Flow
DeepLearning4J
Neuroph
etc.
Coding Requirements:
The final program should accept a the file name of a "grid file" from the command line.
The input file will be a space delimited stream of digits (allowing for easy use the input Scanner).
Since the grid may be of arbitrary size, the first two integers of the file will indicate the number of ROWS and COLS respectively.
(See the example code that I provided).
(Using a randomly generated grid with a fixed seed is probably the most convenient way to test during development, however.)
The Program's output should include:
The final state of the grid
The final score
The total number of nodes searched.
(This isn't in the sample, but it's simply incrementing a counter by 1 every time you explore a new "node")
(I would have placed this right in the core Game Code when calling testMove(), but there is no requirement that you actually use mytestMove() functionality. Since you could some up with something better, the definition of a "node" is not necessarily fixed. This is very common in Chess Engines; some have much higher/lower Node-per-second speeds simply based on the representation of a "node" within the algorithm.)
You must "plan" at least three moves (plies) ahead* before making any actual move on each "ply".
For example, it must go beyond my simple sample of only looking at the next available moves (and certainly not just move randomly, though that would serve as a pretty good "baseline").
*Note that my sample AI only looks one move ahead; analyzing all legal moves from a given position and then moveing based upon whichever direction generated the best score.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
