Welcome Page

Table of Contents

  • Welcome Page
    • Table of Contents
    • Executive Summary
  •  Project Management
    • Team Working Agreement
    • Individual Responsibility Agreement
    • Project Schedule
    • Meeting Notes
  • Business Plan
    • User Identification and Interviews
    • Electronic/Print Advertisement
    • Pitch Video with Demonstration
  • Software Documentation
    • Introduction
    • User Manual
    • Program Description for Developers
    • Final Algorithm, Flowchart, or Pseudocode
    • Final Program with Comments
    • Discussion
    • Conclusion and Recommendations
    • References

Executive Summary

The objective of this task is to use the skills learned in MATLAB and expanding upon them through the exploration of their applications to a game of choice. This game could be increased in difficulty with the addition of a competitive artificial intelligence, or computer player.  In addition to testing the group’s knowledge of certain features of MATLAB, this project also instigates exploration and expansion of the use of those features, and even new features that were not previously known. The new applications of functions that were previously taught were expanded with new usages and combinations with other common MATLAB functions.  With a specific goal in mind, the group is able to actively identify problems related to the objective of the game. This allows the group to research their problems and figure out what feature of MATLAB code will perform the way it needs to for the game to work correctly. By taking into consideration the rules and specifics of the game, the group is urged to make specific revisions so the code works flawlessly.  MATLAB is a program used widely throughout the engineering field, especially in computer science, as it gives a basic idea of the fundamentals and ideologies behind coding. This project allows students to further explore and understand the mindset behind coding, and provides a foundation for the format of some other computer languages.

MATLAB granted a way for the engineering team to create a personalized version of the household game, Battleship. The coding of the game included many aspects of MATLAB code including; loops, arrays, vectors, randomization, mouse inputs, and graphic sprites. It gave way for the team to discover and explore the many different applications that are offered by MATLAB. The end result of the game is a one person game against an artificial intelligence (AI). This AI was programmed by the engineering team to be a difficult opponent in a match against a person. The game includes two grids that show graphic sprites in layers to depict a water picture with four ships. The goal of the individual is to sink all of the ships placed by the AI by choosing grid coordinates. The AI will take its turn against the player and is programmed to be competitive. 

The process of programming the Battleship game was a long roll of trial and error. Difficulties arose in creating the AI and assuring that ship placement was adequate for a correct game every time the code was run. Errors became relevant in the writing of the ship placement due to the fact that the code would occasionally overlap the placed ships on the grid of water which would change the outcome of the game versus the computer. Through trial, error, and research of the MATLAB functions and creating a smart AI, the problem was solved and ships are now placed correctly one hundred percent of the time. This made the game run efficiently and correctly every time it is desired to be played. The engineering team can infer that the end code can be run at any point for a single player to play against a smart computer in Battleship.

In conclusion, MATLAB is a vital resource for the research and conducting of basic programming. It can be used for multiple scenarios, and for this instance was used for the creation of the household game Battleship. Based on the results of the procedure, the team recommends a system of trial and errors to test MATLAB functions until the desired results is run by the code. Sectioning the MATLAB code into individual parts will decrease the area of error and make it easier for the programmer to identify and fix error. MATLAB. Battleship was created through several functions through MATLAB that presented a single player game against a competitive artificial intelligence.