Assignment Task:
The objective of this project is to practice and assess your understanding of functional programming and Haskell. You will write code to implement both the guessing and answering parts of a logical guessing game.
The Game of
Need Help Writing an Essay?
Tell us about your assignment and we will find the best writer for your paper.
Get Help Now!Proj1
Proj1
is a simple two-player logical guessing game created for this project. You will not find any information about the game anywhere else, but it is a simple game and this specification will tell you all you need to know.
The game is somewhat akin to the game of Battleship™, but somewhat simplified. The game is played on a 4×8 grid, and involves one player, the searcher trying to find the locations of three battleships hidden by the other player, the hider. The searcher continues to guess until they find all the hidden ships. Unlike Battleship™, a guess consists of three different locations, and the game continues until the exact locations of the three hidden ships are guessed in a single guess. After each guess, the hider responds with three numbers:
- the number of ships exactly located;
- the number of guesses that were exactly one space away from a ship; and
- the number of guesses that were exactly two spaces away from a ship.
Assessment
Your project will be assessed on the following criteria:
- 20% Correctness of your toLocation and feedbackfunctions;
- 50% Quality and correctness of your guessing code;
- 30% Quality of your code and documentation
The correctness of your
toLocation
and
feedback
functions will be assessed through a number of calls to
toLocation
to construct a target and guess, followed by a call to
feedback
to see if the correct feedback is produced. The correctness of your guessing code will be assessed based on whether it succeeds in guessing the targets it is given in the available time. Quality will be assessed based on the number of guesses needed to find the given targets. Full marks will be given for an average of 6 guesses per target, with marks falling on a logarithmic scale as the number of guesses rises. Thus moving from taking 7 guesses to 6 will gain similar number of points as going from 9 to 7 guesses. Therefore as the number of guesses drops, further small decreases in the number of guesses are increasingly valuable.
Note that timeouts will be imposed on all tests. You will have at least 5 seconds to guess each target, regardless of how many guesses are needed. Executions taking longer than that may be unceremoniously terminated, leading to that test being assessed as failing. Your programs will be compiled with
ghc –make
before testing, so 5 seconds per test is a very reasonable limit.
See the Project Coding Guidelines on the LMS for detailed suggestions about coding style. These guidelines will form the basis of the quality assessment of your code and documentation.
Welcome to Our Online Academic Writing Service. Our online assignment writing website provide various guarantees that will never be broken. No matter whether you need a narrative essay, 5-paragraph essay, persuasive essay, descriptive essay, or expository essay, we will provide you with quality papers at student friendly price.
Ask for Instant Writing Help. No Plagiarism Guarantee!


