Reframing The Problem - DCJS July 2016

Reframing The Problem - DCJS July 2016

6696617169722009ed1ec8c52496c6da?s=128

Daniel Cousineau

July 14, 2016
Tweet

Transcript

  1. reframing the problem

  2. how to think like a computer scientist

  3. how to think

  4. @dcousineau

  5. None
  6. @queens_js

  7. None
  8. None
  9. None
  10. None
  11. None
  12. None
  13. None
  14. THANKS!

  15. how to think like a computer scientist

  16. to solve our problem, we must first invent the universe

  17. None
  18. None
  19. None
  20. None
  21. None
  22. None
  23. None
  24. None
  25. None
  26. None
  27. mental set

  28. None
  29. functional fixedness

  30. None
  31. reduction

  32. None
  33. go rubber duck yourself

  34. 4 1 2 6 3 7 5 8

  35. 4 1 2 6 3 7 5 8 1 2

    4 6 3 7 5 8 up
  36. 4 1 2 6 3 7 5 8 1 2

    4 6 3 7 5 8 up 1 2 4 6 3 7 5 8 right
  37. 4 1 2 6 3 7 5 8 1 2

    4 6 3 7 5 8 up 1 2 4 6 3 7 5 8 right 4 1 2 6 3 7 5 8 right
  38. None
  39. None
  40. None
  41. None
  42. A* -> queue = expand(initial) while queue is not empty:

    dequeue move from queue if move is solution: return move concat expand(move) to queue sort queue by heuristic
  43. expand(state) -> moves = [] if left valid move: add

    state.move(left) to moves if right valid move: add state.move(left) to moves if up valid move: add state.move(left) to moves if down valid move: add state.move(left) to moves return moves
  44. 4 1 2 6 3 7 5 8

  45. 4 1 2 6 3 7 5 8 4 2

    6 1 3 7 5 8 4 1 2 6 3 7 5 8 4 1 2 6 5 3 7 8 4 1 2 6 3 7 5 8
  46. heuristic(state) -> manhattan(state) + outofplace(state)

  47. heuristic

  48. None
  49. None
  50. None
  51. Fun Facts 181439 possible states 241921 possible moves

  52. MORE THAN TOY PROBLEMS

  53. None
  54. Balance as of 12/31/2013 Less Payment 02/14 /2014 Chk#00062440 SUMMER

    DAY 8889-2 DA The Tymes: So Much In Love 0.09100 11 1.00 1.00 Digital Royalty Earned 1.00 BRISTOL STOMP 8896 -2 CD Top Teen Dance Hits (1958-1964) 0.09100 30 2. 73 2.73 DANCE THE MESS AROUND 8897-2 CD The Very Best of Chubby Checker 0 .09100 254 23 . 11 23. 11
  55. so what did we learn?

  56. don’t fixate

  57. pull back, abstract

  58. write down everything you know

  59. if all else fails, google.

  60. fin