The ai player will not be asking

Assignment Help JAVA Programming
Reference no: EM13164754

Part 1:

In this milestone you will create an Artificial Intelligence player for Battleship. You are to create a new class names AIPlayer_netid.java. The class definition appears below. As usual, you will change netid to your actual netid.

            public class AIPlayer_netid implements Player{

     }

Keep in mind, if you modified Player.java from MS3, you should use the modified version.

The AI player will not be asking the user for any input. This means that placeShips() and fire() should not ask the user for locations. The AI player should choose locations of ships and automatically place them, and should choose appropriate coordinates to fire. Just as in MS3, your method signatures in AIPlayer_netid must conform to those found in Player.java.

For 3/4 credit:

  • You must create a Battleship game between a human user and the AI player
  • Your AI player should be able to successfully place all of their ships
  • Your AI player needs to be able to randomly fire at the human player
  • Your AI player must follow the rules of Battleship.
  • Math.random() may be helpful to you.

For full credit:

  • You must create a Battleship game between a human user and the AI player
  • Your AI player should place ships strategically. You should explain your strategy for placing ships in the comments above your placeShips() method
  • Your AI player should not always haphazardly fire at the human player, but should use some form of strategy to win. Your AI player must follow the rules of Battleship. You should explain your strategy for firing in the comments above fire(). Look to your MS1's last task for inspiration

Part 2:

  • Create both an easy (random) AI player AND and difficult (strategic) AI player, and allow the player to choose which one they want to play against.
    (5 pts)
  • Allow the player to either choose to play against either another human, the easy AI, or the difficult AI (5pts)
  • Pit different AI strategies against each other, and determine which is the best algorithm, over hundreds of games. You must write up your results and explain them. You should put the code that calculates the wins in a file called BattleshipBattles.java (15 pts)
  • Create a dynamic AI player that moves ships based on guesses. To keep things fair, ships cannot move to already guessed areas, and are cannot occupy the same space as other ships. Put this AI player in a file called ImpossiblePlayer.java. ImpossiblePlayer should implement the Player class

Reference no: EM13164754

Questions Cloud

Pronouns, and prepositions : Type addKeyword(): for each word on each page, add to a (keyword, URLs) list or dictionary, excluding articles, pronouns, and prepositions. For example:
Allows the user to enter students names followed : Write a program that allows the user to enter students names followed by their test scores and outputs the following information(assume that the maximum nmber of students in the class is 50
Liver leading to bile pigments circulating through the body : Buildup of bile within the liver leading to bile pigments circulating through  the body could cause tissues to turn yellow and a condition called:
How many moles of al2s3 are produced : Solid aluminum reacts according to the balanced equation. If a total of 830 kJ of heat is produced in the reaction as written, how many moles of Al2S3 are produced?
The ai player will not be asking : The AI player will not be asking the user for any input. This means that placeShips() and fire() should not ask the user for locations. The AI player should choose locations of ships and automatically place them
How to calculate the volume of pottasium hydroxide : How to calculate the volume of 1.5M aqueous pottasium hydroxide require to react completly with 2g of benzoic acid and extract the solution twice using the volume calculated?
Digestion is a stomach secretion needed for absorption : Intrinsic factor in digestion is a stomach secretion needed for absorption of  __________ from the small intestine.
What is the theoretical yield of vanadium : What is the theoretical yield of vanadium that can be produced by the reaction of 40.0 g of V2O5 with 40.0 g of calcium based on the following chemical reaction?
The program should support a ''new'' feature : Write a GUI program that represents a simple Notepad clone. The program should support a 'new' feature that clears the text buffer, a save feature that writes to a file using a PrintStream

Reviews

Write a Review

 

JAVA Programming Questions & Answers

  Write a java class

Write a Java class called PQueue that extends the provided abstract QueueADT class.

  Die class that can hold an integer

Design a die class that can hold an integer from 1 to 6. use the dice class to create a dice game. in this game, the user chooses a number between 2 and 12 inclusive

  Java application to declare and create a vector

Write a java application that perform the following task: declare and create a vector with initial size of 10, increment of 2

  What is the minimal total weight of cylinders

A scuba diver uses a special equipment for diving. He has a cylinder with two containers: one with oxygen and the other with nitrogen. Depending on the time he wants to stay under water and the depth of diving the scuba diver needs various amount of ..

  Write a program called word guessing game.

Write a program called Word Guessing Game. Open the file FourLetterWords.txt and write the contents into an array of Strings (the file has 87 words in it).

  Write the method in java

2.char mostOftenIn(String s) that for a given string s, returns the character that occurs most often in s.

  Develop a reliable transfer protocol over udp

Develop a reliable transfer protocol over UDP. Focus on a Stop- and-Wait protocol.

  Prepare address book java application

Prepare an application that reads the contents of your address book file and prepare a user guide that includes a description of the functionality of your overall address book system.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  To report the amount of the fine

To report the amount of the fine, which is $25 for the first hour or pan of an hour that the car is illegally parked, plus $10 for every additional hour or part of an hour that the car is illegally parked

  The string class and/or the stringbuffer class in java

Create a simple Java application that uses the String class and/or the StringBuffer class and at least 4 of the class methods. Show the code, demonstrate it works properly and describe what it is doing.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd