Simple Python Project 3 -- 3

Finalizat Postat la acum 4 ani S-au achitat serviciile după ce au fost prestate
Finalizat S-au achitat serviciile după ce au fost prestate

You are asked to implement two functions for a game-playing agent for the Gobblet Gobblers game demonstrated in section 2.

Program your strategies in the indicated functions in that file.

a. A state evaluation function giving a minimax value for a game state (this be used in a game-playing tournament pitting all students’ submissions against each other. )

b. An alpha-beta search procedure Written part: Answer the written questions in Section 4.

1.1 Submission

[YourCustomID].py: This file should include your completed programming work. Please do not alter the other Python files or submit other files.

THE GAME

For this, we are playing a two-player game called “Gobblet Gobblers”. It is a variant of tic-tac-toe (or noughts and crosses) with the addition of sized pieces and the ability to move pieces that are already on the board. Larger pieces can “swallow” and conceal smaller pieces, either the player’s own or the opposing player’s. The smaller pieces remain on the board, under the larger ones, and are revealed if the larger pieces are moved. When computing the three-in-a-row objective, only the largest piece in a square is considered. The game’s complete rules are online and may be viewed at

[login to view URL]

As the game is capable of cycling (repeating states), we introduce a new rule for our implementation: If a repeated state occurs, the game is declared a draw between the two

players. We also adopt the convention that the blue player always moves first and the

orange second.

- You must use Python version 2.7 to complete this project.

- Unzip the file Assignment3.zip. The file contains a directory structure, with base class definitions for a game-playing frame-work in the files [login to view URL], game [login to view URL], and game state.py. Game definitions for Gobblet Gobblers is in gobblet.py. Some sample game players are defined in the files in the players directory.

You are principally interested in the [login to view URL] file in the players/gobblet subdirectory, which defines an incomplete Gobblet Gobblers minimax player. You will complete the definition of this player to allow it to play the game.

- Rename players/gobblet/[login to view URL] so that it follows the directions above. This

is the file you will alter.

- You may run the program with this command from the Windows command line

(assuming the Python executable is in your PATH):

python [login to view URL] gobblet gobblet_simple gobblet_simple

Or, on any UNIX/Mac system’s command line:

./[login to view URL] gobblet gobblet_simple gobblet_simple

The first argument specifies the name of the game.

The second and third arguments to the command specify the player modules (Python

files) to use for the game.

[login to view URL] resides in the same directory as your Gobblet agent and defines a

not-very-smart Gobblet player: It simply selects the first move from the list of successors

generated from the current game state.

You can also use gobblet_human, which allows humans (you for instance!) to play the

game as one or both players. Also you can play against your implemented heuristic once

done using the following command.

./[login to view URL] gobblet gobblet_human YourCustomID

If you want to play first or the following:

./[login to view URL] gobblet YourCustomID gobblet_human

If you want your heuristic plays first.

Execute the following command for more information on running the program.

./[login to view URL] -h

The evaluation function, evaluate(), in your GobbletPlayer class is incomplete. Given a

game state, the function should return a numeric value indicating how “favorable” a

game state is to the MIN and MAX agents. (A value greater than 0 indicates a state

favorable to MAX; less than 0, favorable to MIN; exactly 0, a neutral state with no

advantage for either player.)

Implement the evaluation function to return such a numeric value.

AI (Artificial Intelligence) HW/SW Inteligență Artificială Python Arhitectură software

ID Proiect: #22104484

Detalii despre proiect

2 propuneri Proiect la distanță Activ acum 4 ani

Acordat lui:

alvinpiter

Hello, I am very familiar with minimax algorithm and alpha beta pruning. I've implemented it before for playing tic-tac-toe and othello. Looking forward to working with you.

%selectedBids___i_sum_sub_7%%project_currencyDetails_sign_sub_8% USD în 3 zile
(20 Recenzii)
4.1

2 freelanceri plasează o ofertă medie de 115$ pentru proiect

Artemrodin1987

Hello client!!! I have read your description carefully and I like working like that. I have rich expertise for 5 years in Python, opencv. MAIN SKILLS ◈ web scraping ◈ Deep learning ◈ Image processing ◈ natural langua Mai multe

$200 USD în 5 zile
(3 recenzii)
2.6