Question: # ! / usr / bin / python 3 ### CSCI - B 3 5 1 / COGS - Q 3 5 1 Spring 2

#!/usr/bin/python3
### CSCI-B 351/ COGS-Q 351 Spring 2020
### Framework code copyright 2020 B351/Q351 instruction team.
### Do not copy or redistribute this code without permission
### and do not share your solutions outside of this class.
### Doing so constitutes academic misconduct and copyright infringement.
import math
from board import Board
class BasePlayer:
def __init__(self, max_depth,horde = False,relative_horde = False,relative_score = False):
self.max_depth = max_depth
self.horde = horde
self.relative_horde = relative_horde
self.relative_score = relative_score
##################
# TODO #
##################
# Assign integer scores to the three terminal states
# P2_WIN_SCORE < TIE_SCORE < P1_WIN_SCORE
# Access these "self.TIE_SCORE", etc.
P1_WIN_SCORE =25
P2_WIN_SCORE =-25
TIE_SCORE =24
# Returns a heuristic for the board position
# Good positions for 0 pieces should be positive and
# good positions for 1 pieces should be negative
# for all boards, P2_WIN_SCORE < heuristic(b)< P1_WIN_SCORE
def heuristic(self, board):
raise NotImplementedError
def findMove(self, trace):
raise NotImplementedError
class ManualPlayer(BasePlayer):

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!