Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to think like a system: Puzzles, Problems, ...

Chris
September 28, 2018

How to think like a system: Puzzles, Problems, and Programs

Strange Loop 2018 talk.

Chris

September 28, 2018
Tweet

More Decks by Chris

Other Decks in Technology

Transcript

  1. How to think like a system: Puzzles, Problems, Programs Chris

    Martens North Carolina State University @ Strange Loop 2018 1
  2. 9 About Me •Assistant Professor, Computer Science @ NC State

    •Director, Principles of Expressive Machines (POEM) Lab •Strange Loop #3 •I <3 functional programming, logic, proofs, etc. •Research: tools & languages for interactive narrative, game AI, procedural generation, system modeling
  3. 10 Lately I’ve been thinking about how things like this

    relate to things like this (Experiential characteristics) (Formal descriptions)
  4. Using Examples to Learn Rules Things humans do: • Hypothesis-driven

    science • Test-driven development Things computers do: • Example-driven program synthesis • Data-trained classifiers
  5. How should we design the tools (game levels, code editors,

    interfaces, programming languages) necessary for humans and computers to do these things together?
  6. Mental Models 17 Predict Explain 1 - P.N. Johnson-Laird. Mental

    Models. Cambridge University Press, Cambridge, 1983. 1
  7. Mental Model Alignment Theory 18 Press right, Mario goes right

    Press A, Mario jumps YouTube “Extra Credits,” episode “Design Club - Super Mario Bros: Level 1-1 - How Super Mario Mastered Level Design.” https://www.youtube.com/watch?v=ZH2wGpEZVgE
  8. Mental Model Alignment Theory 19 Press right, Mario goes right

    Press A, Mario jumps Collide w/this thing ???
  9. Mental Model Alignment Theory 20 Press right, Mario goes right

    Press A, Mario jumps Collide w/this thing, die
  10. Revision 24 Press right, Mario goes right Press A, Mario

    jumps Collide w/angry mushroom, die Collide w/mushroom, get big
  11. Mental Model Alignment Theory In sum: *Mental models simulate an

    external reality *They make predictions and explanations *They generalize from examples *They revise upon failure
  12. What makes a good puzzle? 28 Mark Brown (YouTube video

    of same title): 0. Clever mechanics
  13. 0. Clever Mechanics 30 “Iron-clad rules & limitations that never

    change” In Cosmic Express: * Tracks can’t cross over one another * Each passenger must be taken to a matching box * Each train car can hold 1 passenger * Passengers will try to hop into any empty car that passes them
  14. What makes a good puzzle? 32 1. Assumption 2. Catch

    3. Revelation Building on a solid foundation of mechanics:
  15. Research Goal 43 Use what we learn about mental model

    formation to procedurally generate puzzle sequences that support deep mastery
  16. Problem Solving Games 47 Mark Brown, YouTube: “Puzzle Solving… or

    Problem Solving?”: DISCOVER THE SOLUTION INVENT A SOLUTION vs
  17. Puzzles: small, intentionally-crafted solution space Designed Problems: bigger solution space,

    may be co-designed with problem Programming: big solution space, problem precedes solution 53
  18. Most of us are coding with an incomplete mental model

    of our programming language (see: Gary Bernhardt’s WAT talk) 60 https://www.destroyallsoftware.com/talks/wat
  19. Most of us are coding with an incomplete mental model

    of our programming language … but most of our bugs come from poor mental models of our domains 61
  20. count_os(“strangeloooop”) = 4 count_os(“object oriented”) = 2 count_os(“functional”) = 1

    count_os(“”) = 1337 65 We write tests because we want failure to happen early!
  21. Checkable specs (or fancier types) = more precise communication of

    mental models count_os : s:string -> n:int | 0 <= n <= len(s) 67
  22. Solver-aided tools: directly run our mental models as programs? 71

    …but how do we form correct mental models of the solution space, navigate it, and change it?
  23. Cognitive Artifacts 72 David Krakauer Competitive: enhance our abilities when

    we have the artifact, but leave us just as powerless as we were before using it when we stop using it. Complementary: give us new abilities that we can internalize and use when the artifact is discarded.
  24. Takeaways 75 1. Automated systems that develop mental models are

    more powerful than ones that make them obsolete 2. More research is needed to understand how!
  25. Collaborate! 76 https://go.ncsu.edu/poem * Apply for a Ph.D. in Computer

    Science at NC State! Deadline December 15 * Faculty/industry collaborators welcome!
  26. Zendo 84 (Kory Heath, 1999) Guesser: is the rule that

    there must not be a pentagon? Follows the rule Doesn’t follow the rule