Artificial Intelligence

Programming project

Artificial Intelligence

The programming language should be JAVA, Python, C/C++. If you want to use a different programming

language, please discuss it with the instructor/TAs.

Part I: MINIMAX (45%)

Write a program that gets as input two file names for input and output board positions, and the depth of

the tree that needs to be searched. The program prints a board position after White plays its best move, as

determined by a MINIMAX search tree of the given depth and the static estimation function given in the

Jumpy3 handout. That board position should also be written into the output file. In addition, the program

prints the number of positions evaluated by the static estimation function and the MINIMAX estimate for

that move. The board position is given by a list of 16 letters. See the Jumpy3 handout for additional

information.

First program: MiniMax

The first program plays a move in the opening phase of the game. We request that you name it MiniMax.

For example, the input can be:

(you type:)

MiniMax board1.txt board2.txt 2

(the program replies:)

Board Position: xwwwWxxxxxxxxbbbB

Positions evaluated by static estimation: 9.

MINIMAX estimate: 9987.

Here it is assumed that the file board1.txt exists and its content is:

WwwwxxxxxxxxbbbB

The file board2.txt is created by the program, and its content is:

xwwwWxxxxxxxxbbbB

(The position and the numbers above are most likely correct. They are given just to illustrate the format.)

Part II: ALPHA-BETA (35%)

In this part you are asked to write a program that behave exactly the same as the program of Part I, but

implements the ALPHA-BETA pruning algorithm instead of the MINIMAX. Notice that these programs

should return the exact same estimate values as the programs of Part I; the main difference is in the number

of nodes that were evaluated. 代写Artificial IntelligenceWe request that you call this program AlphaBeta.

Part III: PLAY A GAME FOR BLACK(10%)

Write the same program as in Part I, but the computed move should be Black’s move instead of White’s

move. We request that you call this program MiniMaxBlack.

1Part IV: STATIC ESTIMATION (10%)

Write an improved static estimation function. The new function should be better than the one which was

suggested in the handout. Rewrite the program of Part I with your improved static estimation function. We

request that you call this program MiniMaxImproved.

Due date: to be announced.

For C/C++ implementations and other special cases it may be necessary for you to be present when your

project is being tested.

What you need to submit:

Submit a documented source code, and, if relevant, executables. This should include the source for all eight

programs.

Show examples of the program output when applied to several positions. Give at least two cases in which

alpha-beta produces savings over MINIMAX.

Show at least two examples where your static evaluation function produces different moves than the standard

evaluation function. Write a short (one or two paragraphs) explanation of why you believe your function to

be an improvement over the function proposed by the instructor.

The submission should be a single zip file named with your net ID. For example, if your net ID is xyz1234

your submission file should be named xyz1234.zip.

Community Standards and Conduct

This is an individual project. You may discuss with other students the performance of your program, but

you are not allowed to share code. All programs will be tested for plagiarism.

2

posted @ 2025-03-29 18:56  OHIOT  阅读(17)  评论(0)    收藏  举报