|
Developing Games That Learn Leonard Dorfman and Narendra K. Ghosh 1996 | 300 pages ISBN: 135696178 |
|||
| $34.95 | Softbound print book | Out of print (?) | |
Table of Contents
| Dedications v | |
| About the authors xii | |
| Introduction xiii | |
| 1 | What is objective artificial intelligence? 1 |
| 1.1 | A brief model of human consciousness 2 |
| 1.2 | A brief model of program consciousness 4 |
| 1.3 | Additional complications 5 |
| 1.4 | Objective artificial intelligence 6 |
| Program instinct 7 | |
| Program learning 7 | |
| Program consciousness 7 | |
| 1.5 | OAI suitability query 7 |
| Is there any benefit from demonstrating humanlike performance? 8 | |
| What do you want the program to learn? 8 | |
| What is the nature of the demonstrated learning's quantifiable results? 9 | |
| 1.6 | OAI implementation overview 9 |
| Problem statement 10, OAI analysis 11, OAI design 11 | |
| 1.7 | Summary 12 |
| 2 | Case study - Tic Tac Toe 13 |
| 2.1 | Suitability query 14 |
| 2.2 | OAI implementation overview of Tic Tac Toe 14 |
| Problem statement 14 | |
| Analysis 14 | |
| Analysis discussion 15 | |
| Design 15 | |
| Design discussion 15 | |
| 2.3 | Tic Tac Toe version 1 16 |
| 2.4 | Tic Tac Toe version 2 29 |
| 2.5 | Tic Tac Toe version 3 31 |
| 2.6 | Summary 48 |
| 3 | Drop Four case study overview and analysis 49 |
| 3.1 | Four-in-a-row genre games 50 |
| 3.2 | Drop Four case study 51 |
| 3.3 | Drop Four's OAI suitability query 51 |
| Is there any aspect of the program which will benefit from humanlike performance? 51 | |
| What do you want your program to learn? 52 | |
| What is the nature of Drop Four's demonstrable learning? 52 | |
| 3.4 | OAI implementation overview of Drop Four 52 |
| Drop Four problem statement 52 | |
| Drop Four analysis (branch 1) 53 | |
| Drop Four analysis (branch 2) 53 | |
| Analysis discussion 53 | |
| Analyzing Drop Four program instinct 54 | |
| 3.5 | Summary 59 |
| 4 | OAI design of Drop Four 61 |
| 4.1 | Transition from analysis to design 61 |
| Design-branch 1 61 | |
| Design-branch 2 62 | |
| 4.2 | Historical notes 62 |
| Analyzing Drop Four program learning-move list data 63 | |
| Reality intervenes 65 | |
| Analyzing Drop Four program learning-memory markers 66 | |
| Reality intervenes 66 | |
| A return to marker analysis 67 | |
| 4.3 | Selecting programming environment and tools 67 |
| Designing Drop Four game play features 68 | |
| Designing move selection sequence 68 | |
| Designing Drop Four program instinct 69 | |
| Designing Drop Four program learning 70 | |
| 4.4 | Summary 71 |
| 5 | Drop Four's DOS platform move selection 73 |
| 5.1 | Define statements and function map 73 |
| 5.2 | In the beginning 80 |
| 5.3 | Summary 99 |
| 6 | Drop Four program instinct: Basic concepts mediating move generation 101 |
| 6.1 | The coffin[] array 102 |
| 6.2 | The init_coffin() function 105 |
| 6.3 | The create_coffin(turn) function 105 |
| 6.4 | The create_coffin_o(opponent) function 108 |
| 6.5 | The create_win_board() function 110 |
| 6.6 | The coffin_pattern(turn) function 111 |
| 6.7 | The coffin_corner( UCHAR turn ) function 113 |
| 6.8 | Summary 114 |
| 7 | Drop Four program instinct: Move decision scheme 115 |
| 7.1 | The get_computer_move_first(...) function 115 |
| 7.2 | Summary 143 |
| 8 | Drop Four program instinct: Ply searching 145 |
| 8.1 | Ply search data and functions 145 |
| 8.2 | Initializing ghost boards 148 |
| 8.3 | Relocating data between ghost boards 148 |
| 8.4 | Getting the number of pieces in a ghost column 149 |
| 8.5 | Determining double wins on ghost boards 150 |
| 8.6 | Determining wins on ghost boards 151 |
| 8.7 | Searching for winning positions in ghost boards 152 |
| 8.8 | Can Dr. Plopper win on the next move? 154 |
| 8.9 | Will Dr. Plopper have to block a human win? 155 |
| 8.10 | Can Dr. Plopper set up a forced win in two moves? 157 |
| 8.11 | Dr. Plopper stops a two-move win setup for the human 159 |
| 8.12 | Dr. Plopper blocks a two-ply fork by human 161 |
| 8.13 | Summary 163 |
| 9 | Drop Four program instinct: Primitive pattern-matching 165 |
| 9.1 | Program instinct: non-ply positional moves 166 |
| 9.2 | Program instinct: opening book positional moves 167 |
| 9.3 | Program instinct: opening book defensive moves 171 |
| 9.4 | Program instinct: opening book offensive moves 191 |
| 9.5 | Summary 199 |
| 10 | Drop Four program instinct: Advanced positional move generation 201 |
| 10.1 | In search of a general board position evaluation algorithm 201 |
| 10.2 | Searching for three-filled patterns on the board 202 |
| 10.3 | Searching for three-filled patterns on ghost1 203 |
| 10.4 | Returning a move which creates three-filled patterns 203 |
| 10.5 | General position evaluation 205 |
| 10.6 | Summary 227 |
| 11 | Drop Four program learning: Analyzing a loss 229 |
| 11.1 | Adding a move to the move list 229 |
| 11.2 | First-move analysis 231 |
| 11.3 | Level-two analysis opponent_type_move(...) support function 233 |
| 11.4 | Second move analysis 234 |
| 11.5 | Second move computer analysis 235 |
| 11.6 | Offensive first move analysis 236 |
| 11.7 | Offensive second move analysis 237 |
| 11.8 | Offensive second move computer analysis 238 |
| 11.9 | Implementation of marker disruption via first_pat_analysis(...) 239 |
| 11.10 | Adding a three-filled marker record and mirror to the program subconscious 250 |
| 11.11 | Summary 252 |
| 12 | Drop Four program learning: Implementation 253 |
| 12.1 | Finding winning patterns 253 |
| 12.2 | Learning is demonstrated via first_move_check(...) 256 |
| 12.3 | Learning is demonstrated via second_move_check(...) 258 |
| 12.4 | Learning is demonstrated via first_human_win(...) 259 |
| 12.5 | Learning is demonstrated via second_human_win(...) 260 |
| 12.6 | Learning is demonstrated via off_first_human_win(...) 262 |
| 12.7 | Learning is demonstrated via off_second_human_win(...) 263 |
| 12.8 | The off_first_move_check(...) function 265 |
| 12.9 | The off_second_move_check(...) function 266 |
| 12.10 | Summary 267 |
| 13 | Transferring the program subconscious to and from disk and RAM 269 |
| 13.1 | Transferring the program subconscious from hard disk to RAM 269 |
| 13.2 | Transferring the program subconscious from RAM to hard disk 272 |
| 13.3 | Summary 273 |
| Epilogue 275 | |
| Index 277 | |
DESCRIPTION
If you've ever wondered how to empower your software with the ability to learn from experience, this book is for you. Developing Games That Learn shows in detail how to implement single-trial learning, illustrating its approach in board games Tic Tac Toe and a more complex game called Drop Four. The authors discuss the learning algorithms and present the source code that implements them.The program learning techniques are presented in sufficient detail to be useful for practical software design. They are particularly suited to computer game development, but can also be used in other areas. This book provides valuable guidance for programmers, project leaders, and game designers.
Existing approaches to program learning are often of the "dumb" type-the program simply learns not to repeat any sequence that led to failure. Authors Dorfman and Ghosh take a more powerful path: for each example of failure, their method first finds the point of no return-the point after which the game was certain to be lost. Then that point is prevented from being reached via any of a number of different (but equivalent) paths, not just the single path actually played, thus accelerating the learning.
If you are interested in using these techniques in applications other than games, the authors discuss ways to do that.
ABOUT THE AUTHORS...
Leonard Dorfman, Ph.D., is the author of 22 computer science books, concentrating on C, C++, and Assembly language, a black comic novel, and four commercial software products. He has a strong background in educational research, and interest in psychology, philosophy, and Buddhist studies. He's a teacher and writer, and keeps shop at MultiGrain Solutions, a software development company.Narendra K. Ghosh is currently obtaining a degree in computer science from Harvard University. He worked cooperatively with Len in developing Objective Artificial Intelligence and the learning algorithms, and in implementing the code used in the demonstration programs.
