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

Reframing The Problem - TrueNorthPHP 2014

Reframing The Problem - TrueNorthPHP 2014

6696617169722009ed1ec8c52496c6da?s=128

Daniel Cousineau

November 08, 2014
Tweet

More Decks by Daniel Cousineau

Other Decks in Technology

Transcript

  1. reframing the problem

  2. how to think like a computer scientist

  3. how to think

  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. please rate me on joind.in https://joind.in/12724

  11. how to think like a computer scientist

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

  13. None
  14. None
  15. None
  16. None
  17. None
  18. None
  19. None
  20. None
  21. None
  22. None
  23. mental set

  24. None
  25. functional fixedness

  26. None
  27. reduction

  28. None
  29. go rubber duck yourself

  30. 4 1 2 6 3 7 5 8

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

    4 6 3 7 5 8 up
  32. 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
  33. 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
  34. None
  35. None
  36. None
  37. None
  38. 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
  39. 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
  40. 4 1 2 6 3 7 5 8

  41. 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
  42. heuristic(state) -> manhattan(state) + outofplace(state)

  43. heuristic

  44. None
  45. None
  46. None
  47. so what did we learn?

  48. don’t fixate

  49. pull back, abstract

  50. write down everything you know

  51. if all else fails, google.

  52. please rate ALL talks https://joind.in/12724