Question: Hello computer science experts, I need you to create a * full * and * complete * Python AI program for a Python battle game

Hello computer science experts, I need you to create a *full* and *complete* Python AI program for a Python battle game (please do not use ChatGPT to make the program!).Here is the context, including the requirements, explanation of required functions, Python Battle game code, and the code for randombot and hunterbot. Please start with the hunterbot code as a base (it is the last picture) and call the other functions as the requirements ask.
Movement
Did you call all the functions? (lookAtSpace() is optional)
Do any movement functions get called when they shouldn't, e.g. does your bot try to move forward into a
wall?
Does your bot move appropriately as if a human is controlling it?
Non-Movement
Did you call at least four of the eight non-movement functions including the required attack() function?
Do any of the functions get called when they shouldn't, e.g. an ability is called without enough energy or
an attack is called when the enemy is in the wrong spot?
Are the non-movement abilities used logically and do they vary depending on the situation?
Elegance
Does your code go beyond basic movement and attacking?
Did you add attributes to your own Al class for various reasons?
Did you add in your own extra functions?
Did you write your code like a chess match, i.e. you anticipate how your opponent will behave?
Al Opponents -
Does your code beat randombot?
Does your code beat hunterbot?
Hunterbot:
class AI:
def init(self):
self.isFirstTurn = True
def turn(self):
if self.robot.lookInFront()== "bot":
self.robot.attack()
else:
self.goTowards(self.robot.locateEnemy()
[0])
def checkDelta(self,enemyLocation):
myLocation = self.robot.position
delta =(enemyLocation[0]-
myLocation[0],enemyLocation[1]-myLocation[1])
return delta
def goTowards(self,enemyLocation):
myLocation = self.robot.position
delta =(enemyLocation[0]-
myLocation[0],enemyLocation[1]-myLocation[1])
if abs(delta[0])> abs(delta[1]):
if delta[0]0:
targetOrientation =3 #face left
else:
targetOrientation =1 #face right
else:
if delta[1]0:
targetOrientation =0 #face up
else:
targetOrientation =2 #face down
if self.robot.rotation == targetOrientation:
self.robot.goForth()
else:
leftTurnsNeeded =(self.robot.rotation -
targetOrientation)%4
if leftTurnsNeeded =2:
self.robot.turnLeft()
else:
self.robot.turnRight()
Hello computer science experts, I need you to

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!