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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  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..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  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.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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