In the Real World

The term artificialintelligence (AI) was first coined at the Massachusetts Institute of Technology in the mid 1950s and refers to the branch of computer science that tries to make computers think like humans. In reality, there is no such thing (at least not yet). Instead, AI is mimicked in a computer by very clever algorithms designed by computer scientists and then written into a program. At this point in time, human understanding of our own brain function is much too inadequate in order to properly write a program that can generate thoughts in a computer that are as complex as thoughts in our own minds. However, in 1997 computer scientists at IBM were able to write a program for a super-computer that defeated world chess champion Gary Kasparov.

The requirements for Battlecell as I have defined them follow:

1. The program shall use a single worksheet for the game board.

2. When the program file is opened or the workbook window is resized, the program shall maximize the application window and size the worksheet such that the game board fits within the application window.

3. The user's and computer's grid shall be 10 by 10 cells in size and defined in separate ranges on the worksheet.

4. A range of merged cells shall be used to output messages to the user.

5. The game shall begin from the click of a Command Button control.

6. The Command Button control shall be disabled while the game is played.

7. When the user places his or her ships, the program shall output a message to the user indicating what ship (name and number of cells) is to be placed on the game board.

8. The user shall place 5 ships on their game board by selecting the appropriate number of cells (5 = carrier, 4 = destroyer, 3 = battleship, 2 = submarine, 1 = patrol boat).

9. The program shall validate the user's ship selections for location (the entire ship must be within the user's grid and cannot overlap another ship) and size (the ship must be of the correct length and be contained entirely within one worksheet row or one worksheet column) and display a message box citing a reason for an invalid selection.

10. The program shall output error messages to the user for: wrong length, outside range, spans multiple rows and columns, overlap with another ship.

11. The program shall color the worksheet cell light blue when the user selects a valid location for a ship.

12. After the player has finished placing his or her ships, then the program shall randomly choose locations for its ships following the same validation rules as the player (within its own grid).

13. The computer shall mark the location of its ships with an X entered into the cells. The font format shall match the color of the background so the user cannot see the location of the computer's ships.

14. The user shall fire at the computer's ships by selecting an individual cell on the computer's grid.

15. The user's selection of a target shall be validated for range length (only one cell allowed) and location (must be within the computer's grid). An appropriate error message shall be output if the user's target selection is invalid.

16. When the user selects a target, the program shall play a sound file simulating cannon fire.

17. When the user selects a target, the program shall play a sound file simulating an explosion if it's a hit.

18. If the user scores a miss, the target cell shall be colored blue.

19. If the user scores a hit, the target cell shall be colored red.

20. The computer shall fire a random shot at the user's grid after each shot taken by the user.

21. If the computer scores a miss, then the target cell shall be colored green.

22. If the computer scores a hit, then the target cell shall be colored red.

23. When the game is over (either the user or computer has scored 17 hits), the program shall output a message to the game board.

24. When the game is over, the program shall play one of two different sound files depending on the winner.

25. When the workbook file is closed, the program shall clear the game board, enable the Command Button control, and resave the workbook file.

Biorhythm Awareness

Biorhythm Awareness

Who else wants to take advantage of biorhythm awareness to avoid premature death, escape life threatening diseases, eliminate most of your life altering mistakes and banish catastrophic events from your life.

Get My Free Ebook

Post a comment