Daniel Cousineau
July 14, 2016
94

# Reframing The Problem - DCJS July 2016

July 14, 2016

## Transcript

1. reframing
the problem

2. how to think
like a
computer
scientist

3. how to think

4. @dcousineau

5. @queens_js

6. THANKS!

7. how to think
like a
computer
scientist

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

9. mental set

10. functional fixedness

11. reduction

12. go rubber
duck
yourself

13. 4 1 2
6 3
7 5 8

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

15. 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

16. 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

17. 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

18. expand(state) ->
moves = []
if left valid move:
if right valid move:
if up valid move:
if down valid move:
return moves

19. 4 1 2
6 3
7 5 8

20. 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

21. heuristic(state) ->
manhattan(state) + outofplace(state)

22. heuristic

23. Fun Facts
181439 possible states
241921 possible moves

24. MORE THAN TOY PROBLEMS

25. 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

26. so what did
we learn?

27. don’t fixate

28. pull back,
abstract

29. write down
everything you
know

30. if all else fails,