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

  Web engineering principles

web application development, Web Engineering methodology, UML-based Web Engineering (UWE), models to the expansion of web applications, Object Oriented Web Solutions (OOWS),Web Modeling Language (WebML) methodology, Object-Oriented Hypermedia Design..

  Sorting routine adopted in the java api for arrays.sort()?

What is the sorting routine adopted in the Java API for Arrays.sort()? How different is it from the sorting routine we discussed in class? Is it better? Explain your answers in short clear sentences.

  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.

  Vehicle in vehicle.java

Create a class called Vehicle in Vehicle.java with instance variables make (such as Ford, GM, Chrysler, Toyota, or Honda), year, and horsepower (200, 300, and 400). Add the necessary constructor and set and get methods.

  Identify the first character of the name and lengthof length

Write a Java application that stores the names of your family and friends in a one-dimensional array of Strings. The program should show all names in upper case and lower case, identify the first character of the name, and the lengths of the names.

  Tracer for java

Implementation of a tracer of Java objects and the tracer can be invoked from any point of a Java program, accepting an object as argument.

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Program that counts the number of occurrences of lowercase

Write a program that counts the number of occurrences of lowercase and uppercase vowels in entered lines of text. Use a two-dimensional array to store the vowel counts. The array's first column holds the counts for the lowercase vowels, and the secon..

  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.

  Write a method called makerow

Write a method called makeRow that is passed two arguments: an int and a String. It returns a String containing n copies of s, concatenated in a row. For instance, if we call the method with makeRow(5, "*"), the method returns *****.

  A common useful equation

In physics, a common useful equation for finding the position s of a body in linear motion at a given time t, based on its initial position s0, initial velocity v0, and rate of acceleration a, is the following: ??= ??0+??0??+12????2. Write code to de..

  Create three classes for a customer

a travel manager and have a job of buying a travel package for a customer. You must create three classes for this programming challenge: Customer, Ticket, and TravelManagerDemo.

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