Skip to main content
  • Textbook
  • © 2022

Animated Problem Solving

An Introduction to Program Design Using Video Game Development

Authors:

  • Introduces systematic problem solving and reasoning, from basics like expression writing to distributed programming
  • Emphasizes type-driven design using divide and conquer and iterative refinement
  • Develops a video game step-by-step by applying new knowledge in increasingly better versions

Part of the book series: Texts in Computer Science (TCS)

Buy it now

Buying options

eBook USD 44.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book USD 84.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

This is a preview of subscription content, log in via an institution to check for access.

Table of contents (30 chapters)

  1. Front Matter

    Pages i-xix
  2. The Basics of Problem Solving with a Computer

    1. Front Matter

      Pages 1-1
    2. The Science of Problem Solving

      • Marco Morazán
      Pages 3-20
    3. Expressions and Data Types

      • Marco Morazán
      Pages 21-46
    4. The Nature of Functions

      • Marco Morazán
      Pages 47-69
    5. Aliens Attack Version 0

      • Marco Morazán
      Pages 71-100
    6. Making Decisions

      • Marco Morazán
      Pages 101-126
    7. Aliens Attack Version 1

      • Marco Morazán
      Pages 127-150
  3. Compound Data of Finite Size

    1. Front Matter

      Pages 151-151
    2. Structures

      • Marco Morazán
      Pages 153-166
    3. Defining Structures

      • Marco Morazán
      Pages 167-183
    4. Aliens Attack Version 2

      • Marco Morazán
      Pages 185-223
    5. Structures and Variety

      • Marco Morazán
      Pages 225-237
    6. Aliens Attack Version 3

      • Marco Morazán
      Pages 239-261
  4. Compound Data of Arbitrary Size

    1. Front Matter

      Pages 263-263
    2. Lists

      • Marco Morazán
      Pages 265-280
    3. List Processing

      • Marco Morazán
      Pages 281-318
    4. Natural Numbers

      • Marco Morazán
      Pages 319-329
    5. Interval Processing

      • Marco Morazán
      Pages 331-347
    6. Aliens Attack Version 4

      • Marco Morazán
      Pages 349-372

About this book

This textbook is about systematic problem solving and systematic reasoning using type-driven design. There are two problem solving techniques that are emphasized throughout the book: divide and conquer and iterative refinement. Divide and conquer is the process by which a large problem is broken into two or more smaller problems that are easier to solve and then the solutions for the smaller pieces are combined to create an answer to the problem. Iterative refinement is the process by which a solution to a problem is gradually made better–like the drafts of an essay. Mastering these techniques are essential to becoming a good problem solver and programmer.  

The book is divided in five parts. Part I focuses on the basics. It starts with how to write expressions and subsequently leads to decision making and functions as the basis for problem solving. Part II then introduces compound data of finite size, while Part III covers compound data of arbitrarysize like e.g. lists, intervals, natural numbers, and binary trees. It also introduces structural recursion, a powerful data-processing strategy that uses divide and conquer to process data whose size is not fixed. Next, Part IV delves into abstraction and shows how to eliminate repetitions in solutions to problems. It also introduces generic programming which is abstraction over the type of data processed. This leads to the realization that functions are data and, perhaps more surprising, that data are functions, which in turn naturally leads to object-oriented programming. Part V introduces distributed programming, i.e., using multiple computers to solve a problem.  

This book promises that by the end of it readers will have designed and implemented a multiplayer video game that they can play with their friends over the internet. To achieve this, however, there is a lot about problem solving and programming that must be learned first. The game is developed using iterative refinement. The reader learns step-by-step about programming and how to apply new knowledge to develop increasingly better versions of the video game. This way, readers practice modern trends that are likely to be common throughout a professional career and beyond.  

Reviews

“What can attacking aliens teach us about programming? Everything from basic data to distributed computing! This book uses animations to teach this very broad sweep of topics, using simple games to motivate and illustrate ideas, while grounding everything in strong design processes—showing that introductory texts do not need to (falsely) choose between sparking interest and maintaining rigor.” (Shriram Krishnamurthi, Computer Science Department, Brown University)


“This is one of those rare programming books that is much more about algorithmic thinking and problem solving than a specific programming language. The author takes us on a gentle and entertaining journey to improve our problem solving skills using variations of Aliens Attack and other attractive challenges. Warmly recommended to increase your logical thinking, even if you are not a computer science student.” (Pieter Koopman, Institute for Computing and Information Sciences Radboud, University Nijmegen) 


“I highly recommended this book for those who want to start a career as computer engineers, as well as for those who, even though they are not interested in computer science as a career, want to acquire a clear idea about how computer scientists deal with problem solving. The book introduces us in a clear and entertaining way to the main problem-solving techniques, applicable both within and outside the area of computer science. In addition, the reader will be able to experience the pleasure of creating a video game step by step, understanding all the development phases.” (Fernando Rubio, Computing Science Department, Universidad Complutense de Madrid) 


“This book teaches introductory programming very thoroughly. Throughout the book there are detailed and insightful discussions of the code, with a strong emphasis on unit testing, and careful definition of good example data for use in tests. Students learn to build a variety of graphical games, in particular eight versions of "Space Invaders", which reappears throughout the book, providing a natural context to discuss not only basics such as list programming, but also iterative design, refactoring, and (in the final chapters) even distributed systems, with the race conditions and trade-offs that then appear. The book even introduces object-orientation as an alternative way to structure code, as an application of Racket's first-class functions. This book is not only a good introduction to programming in the functional style, it also gives many useful pointers to concepts that will return in a variety of later courses. I recommend it!” (John Hughes, Computing Science Department, Chalmers University of Technology)

Authors and Affiliations

  • Department of Computer Science, Seton Hall University, South Orange, USA

    Marco T. Morazán

About the author

Marco T. Morazán joined Seton Hall University in 1999 where he teaches at all levels of the Computer Science curriculum including his signature courses on Problem Solving and Programming. He is a strong proponent of program by design in which types guide program development and the author of multiple peer-reviewed articles on computer science education and the implementation of programming languages. Animated Problem Solving is the result of over ten years learning from his students how to teach them type-based programming.

Bibliographic Information

  • Book Title: Animated Problem Solving

  • Book Subtitle: An Introduction to Program Design Using Video Game Development

  • Authors: Marco T. Morazán

  • Series Title: Texts in Computer Science

  • DOI: https://doi.org/10.1007/978-3-030-85091-3

  • Publisher: Springer Cham

  • eBook Packages: Computer Science, Computer Science (R0)

  • Copyright Information: The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Switzerland AG 2022

  • Hardcover ISBN: 978-3-030-85090-6Published: 14 January 2022

  • Softcover ISBN: 978-3-030-85093-7Published: 15 January 2023

  • eBook ISBN: 978-3-030-85091-3Published: 13 January 2022

  • Series ISSN: 1868-0941

  • Series E-ISSN: 1868-095X

  • Edition Number: 1

  • Number of Pages: XIX, 688

  • Number of Illustrations: 112 b/w illustrations, 88 illustrations in colour

  • Topics: Software Engineering/Programming and Operating Systems, Programming Techniques, Game Development

Buy it now

Buying options

eBook USD 44.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book USD 84.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access