This SDS describes how to implement the function and performance requirements for When Animals Attack. The WAA system is a self contained game with artificial intelligence backed computer players. The artificial intelligence will consist of machine learning and human designed heuristics.
When Animals Attack
Functionality:
Human vs. Human (Hot Seat)
Human vs. Machine
Varying Levels of Difficulty
Original Game (Different)
Limitations:
No Network Play
Original Game (Possible Overwhelming Strategy)
AI – Artificial Intelligence – Computer generated strategy for solving non-predetermined problems. Game strategy in this case.
API – Application Program Interface
GUI – Graphical User Interface
IDE – Integrated Developer Environment
ML – Machine Learning – Artificial Intelligence based on patterns observed in large databases of played games.
VS.NET – Visual Studio dot Net API/IDE
WAA – When Animals Attack – Project
Russell and Norvig. Artificial Intelligence, 2nd Edition Prentice Hall, 2003
This document will give a general outline of how to implement WAA at the software level. This document will change throughout the lifetime of the project.
AI
Machine Learning
GUI
Game rules
Database

The Rules is the central module, and encodes a GameState class. If any humans are involved in play, then the GUI will construct the initial GameState object and manipulate it as neccesary. If the no humans are involved in play, then the AI or ML constructs the initial GameState.
There will be a game window, a menu window, board pieces, etc. When you click on a game square information will appear in a status window. You click and drag game pieces to make a move.
Identification: The unique name for the component and the location of the component in the system.
Type: A module, a subprogram, a data file, a control procedure, a class, etc
Purpose: Function and performance requirements implemented by the design component, including derived requirements. Derived requirements are not explicitly stated in the SRS, but are implied or adjunct to formally stated SDS requirements.
Function: What the component does, the transformation process, the specific inputs that are processed, the algorithms that are used, the outputs that are produced, where the data items are stored, and which data items are modified.
Dependencies: How the component's function and performance relate to other components. How this component is used by other components. The other components that use this component. Interaction details such as timing, interaction condition (such as order of execution and data sharing), and responsibility for creation, duplication, use, storage, and elimination of components.
Interfaces: Detailed descriptions of all external and internal interfaces as well as of any mechanisms for communication through messages, parameters, or common data areas. All error messages and error codes should be identified. All screen formats, interactive messages, and other user interface components (originally defined in the SRS) should be given here.
Resources: A complete description of all the resources (hardware or software) external to the component but required to carry out its functions. Some examples are CPU execution time, memory (primary, secondary, or archival), buffers, I/O channels, plotters, printers, math libraries, hardware registers, interrupt structures, and system services.
Processing: The full description of the functions presented in the Function subsection. Pseudo code can be used to document algorithms, equations, and logic.
Data: For the data internal to the component, describes the representation method, initial values, use semantics, and format. This information will probably be recorded in the data dictionary.
Identification: AI (Artificial Intelligence)
Type: A module
Purpose: The module will codify heuristics of how the computer should play to win the game.
Function: This will take a game state from the game module, and mainpulate the game state by making a move for the game module. It will use some heuristics that we will formulate once we have had some experience playing the game.
Dependencies: Self contained other than needing the game state.
Interfaces: It will use an object to communicate with the game module. In particular it will receive a game state and manipulate the game state with a valid move before returning.
Resources: CPU time and memory. We will build in a mechanism to limit the amount of decision time that the module will have to generate a turn.
Processing: TBA
Data: The module will get a game state and manipulate the game state with a move.
Identification: Machine Learning.
Type: A module
Purpose: It will play itself and store all of the moves in the database. It will then use the database during human play to decide what move to make.
Function: This will take a game state from the game module, and will then manipulate it with a move the game module. It will use the collection of moves that in it has generated and stored in a database to formulate the best move to make next.
Dependencies: It will use the Database module to pull data that it can then use to decide the moves.
Interfaces: It will use an object to communicate with the game module. In particular it will receive a game state and manipulate the game state with a valid move before returning.
Resources: CPU time and memory. We will build in a mechanism to limit the amount of decision time that the module will have to generate a turn.
Processing: TBA
Data: The module will get a game state and manipulate the game state with a move.
Identification: Game Rules
Type: A module
Purpose: It will enforce the game rules, rejecting illegal moves. It will also serve as the representation of a game.
Function: Presents acceptable moves to the GUI. It takes in possible moves from the user and the computer player. It will also keep the current game state, and will determine when the game is over.
Dependencies: It takes moves from the ML, AI, and GUI and manipulates the game state so that the GUI can present it to the user. It also passes a game state to the AI and ML.
Interfaces: Gives out game states and accepts game moves.
Resources: CPU time and memory.
Processing: TBA
Data: The module will get a “move” and will generate a “game state”.
Identification: GUI (Graphical User Interface)
Type: A module
Purpose: The GUI is used to interact with the user.
Function: It will take mouse and keyboard interaction from the user and will display the game state and processing status to the user.
Dependencies: It relies on the Game Rules to validate moves, and to generate the new game state after the user or computer has made a move.
Interfaces: When a move event is triggered by the user, the module will pass the move to the Game Rules module as an object. It will then wait for the other player to move and then return a game state.
Resources: CPU time and memory.
Processing: TBA
Data: The module will get a “move” from the user and will pass it to the Game Rules module which will then return a new “game state”.
Identification: Database
Type: A module
Function: The database will store a set of ordered game states. The stored information will be used by other modules to generate “smart” moves to make.
Dependencies: ML will use this module to store and retrieve game states.
Interfaces: The Machine Learning module will generate game states through self play and store them in the database using this module. It will then use this module to help decide what move to make next.
Resources: CPU time and memory. We will build in a mechanism to limit the amount of decision time that the module will have to generate a turn.
Processing: TBA
Data: The module will be used to store and retrieve ordered game states.
We are designing a new game, and thus all of the work must be original. We will, however be using some components of the .NET framework. Particularly the GUI building aspects of .NET.
We decided to abandon adding network gaming in order to keep it simple, and to save time. We went with a board game because the moves are discrete and will thus allow us to use Machine Learning and AI.
Not Applicable (May add in the future)
public static void main(String[] args){...}