Jangsea Park
August 12, 2017
730

# [PyConKR2017] Best-first search를 이용한 다차원 큐브 탐색

August 12, 2017

## Transcript

߅੢द

9. ### Much more numbers (A,) = 5 (A, B) = 25

(A, B, C) = 125 … (A, B, …, G) = 5 ** 7 6.7B
10. ### Multidimensional cube s: 427 r: 87 d: 122 s: 283

r: 23 d: 124 s: 291 r: 19 d: 872 s: 123 r: 108 d: 503 s: 287 r: 13 d: 687 s: 987 r: 432 d: 1113 s: 293 r: 18 d: 983 s: 293 r: 2929 d: 7023 s: 111 r: 72 d: 982 s: 293 r: 199 d: 777 s: 28 r: 1 d: 134 s: 19 r: 0 d: 29 s: 100 r: 29 d: 89 s: 192 r: 19 d: 192 s: 293 r: 18 d: 298 s: 19 r: 1 d: 29 Region Gender Age The most eﬃcient

12. ### Restrictions 137,979 10 queries per second (QPS) per IP address

10 concurrent requests per view (proﬁle) 137,979 / 10 / 60 = 230min 10,000 requests per view (proﬁle) per day
13. ### Better way Gender Age Region / Campaign Usertype Gender, Region

Age, Campaign Region, Usertype Region, Usertype, Gender Region, Usertype, Campaign Usertype, Age Region, Usertype, Gender, Age s: 427 r: 87 d: 122 s: 283 r: 23 d: 124 s: 291 r: 19 d: 872 s: 123 r: 108 d: 503 s: 287 r: 13 d: 687 s: 987 r: 432 d: 1113 s: 293 r: 18 d: 983 s: 293 r: 2929 d: 7023 s: 111 r: 72 d: 982 s: 293 r: 199 d: 777 s: 28 r: 1 d: 134 s: 19 r: 0 d: 29 s: 100 r: 29 d: 89 s: 192 r: 19 d: 192 s: 293 r: 18 d: 298 s: 19 r: 1 d: 29 Region Gender Age
14. ### Graph search A B D H I E J K

C F L M G N O

17. ### Breadth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier:
18. ### Breadth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C
19. ### Breadth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: C D E B
20. ### Breadth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: D E B C F G
21. ### Breadth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: D E B C F G H I
22. ### Breadth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: D E B C F G H I J K
23. ### Breadth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: D E B C F G H I J K L
24. ### Breadth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: D E B C F G H I J K L

26. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier:
27. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C
28. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C E D
29. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C E D I H
30. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C E D I H
31. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C E D I H
32. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C E D I H K J
33. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C E D I H K J
34. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C E D I H K J
35. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C E D I H K J F G
36. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C E D I H K J F G
37. ### Depth-ﬁrst search A B D H I E J K

C F L M G N O A Explored: Frontier: B C E D I H K J F G

39. ### Best-ﬁrst search A B C D E F G H

I J K L M N O P 3 4 5 3 2 4 7 6 4 3 2 1 2 2 3 4 1 2 4 A: 15 B: 15 C: 10 D: 12 E: 12 F: 7 G: 11 H: 5 I: 5 J: 6 K: 4 L: 4 M: 0 N: 1 O: 4 P: 6
40. ### Best-ﬁrst search A B C D E F G H

I J K L M N O P 3 4 5 3 2 4 7 6 4 3 2 1 2 2 3 4 1 2 4 A: 15 B: 15 C: 10 D: 12 E: 12 F: 7 G: 11 H: 5 I: 5 J: 6 K: 4 L: 4 M: 0 N: 1 O: 4 P: 6 3+15=18 5+10=15 4+12=16
41. ### Best-ﬁrst search A B C D E F G H

I J K L M N O P 3 4 5 3 2 4 7 6 4 3 2 1 2 2 3 4 1 2 4 A: 15 B: 15 C: 10 D: 12 E: 12 F: 7 G: 11 H: 5 I: 5 J: 6 K: 4 L: 4 M: 0 N: 1 O: 4 P: 6 3+15=18 4+12=16 12+7=19 11+5=16
42. ### Best-ﬁrst search A B C D E F G H

I J K L M N O P 3 4 5 3 2 4 7 6 4 3 2 1 2 2 3 4 1 2 4 A: 15 B: 15 C: 10 D: 12 E: 12 F: 7 G: 11 H: 5 I: 5 J: 6 K: 4 L: 4 M: 0 N: 1 O: 4 P: 6 3+15=18 8+6=14 12+7=19 11+5=16
43. ### Best-ﬁrst search A B C D E F G H

I J K L M N O P 3 4 5 3 2 4 7 6 4 3 2 1 2 2 3 4 1 2 4 A: 15 B: 15 C: 10 D: 12 E: 12 F: 7 G: 11 H: 5 I: 5 J: 6 K: 4 L: 4 M: 0 N: 1 O: 4 P: 6 3+15=18 11+4=15 12+7=19 10+5=15
44. ### Best-ﬁrst search A B C D E F G H

I J K L M N O P 3 4 5 3 2 4 7 6 4 3 2 1 2 2 3 4 1 2 4 A: 15 B: 15 C: 10 D: 12 E: 12 F: 7 G: 11 H: 5 I: 5 J: 6 K: 4 L: 4 M: 0 N: 1 O: 4 P: 6 3+15=18 11+4=15 12+7=19 12+4=16
45. ### Best-ﬁrst search A B C D E F G H

I J K L M N O P 3 4 5 3 2 4 7 6 4 3 2 1 2 2 3 4 1 2 4 A: 15 B: 15 C: 10 D: 12 E: 12 F: 7 G: 11 H: 5 I: 5 J: 6 K: 4 L: 4 M: 0 N: 1 O: 4 P: 6 3+15=18 13+4=17 12+7=19 12+4=16 15+0=15
46. ### More about Best-ﬁrst search heapq — Heap queue algorithm https://docs.python.org/3.6/library/heapq.html#theory

[AIMA] 3.5 INFORMED (HEURISTIC) SEARCH STRATEGIES [AIMA] 3.6 HEURISTIC FUNCTIONS
47. ### Best-ﬁrst search for GA API Gender Age Region / Camp

Type S: 1000 R: 10000
48. ### Best-ﬁrst search for GA API Gender Age Region / Camp

Type S: 1000 R: 10000 Female S: 600 R: 8000 Male S: 400 R: 2000
49. ### Best-ﬁrst search for GA API Gender Age Region / Camp

Type Gender Age Gender Region Gender Camp Gender Type
50. ### Best-ﬁrst search for GA API Gender Age Region / Camp

Type Gender Age Gender Region Gender Camp Gender Type 1.0 1.0 1.0 1.0 0.8 0.8 0.8 0.8 0.8
51. ### Best-ﬁrst search for GA API Gender Age Region / Camp

Type 0.6 1.0 1.0 1.0 0.8 10s S: 100 R: 200 20s S: 500 R: 2000 30s S: 200 R: 6000 40s S: 100 R: 1000 50+ S: 100 R: 800
52. ### Best-ﬁrst search for GA API Gender Age Region / Camp

Type Gender Age Gender Region Gender Camp Gender Type 0.6 1.0 1.0 1.0 0.48 0.8 0.8 0.8 0.8 Age Region Age Camp Age Type 0.6 0.6 0.6
53. ### Best-ﬁrst search for GA API Gender Age Region / Camp

Type Gender Age Gender Region Gender Camp Gender Type 0.6 0.4 1.0 1.0 0.48 0.8 0.32 0.8 0.8 Age Region Age Camp Age Type 0.24 0.6 0.6
54. ### Best-ﬁrst search for GA API Gender Age Region / Camp

Type Gender Age Gender Region Gender Camp Gender Type 0.6 0.4 1.0 1.0 0.48 0.8 0.32 0.8 0.8 Age Region Age Camp Age Type 0.24 0.6 0.6 Region Camp Region Type 0.4 0.4
55. ### Best-ﬁrst search for GA API Gender Age Region / Camp

Type Gender Age Gender Region Gender Camp Gender Type 0.6 0.4 0.2 1.0 0.48 0.8 0.32 0.16 0.8 Age Region Age Camp Age Type 0.24 0.12 0.6 Region Camp Region Type 0.08 0.4 Camp Type 0.2
56. ### Best-ﬁrst search for GA API Gender Age Region / Camp

Type Gender Age Gender Region Gender Camp Gender Type 0.6 0.4 0.2 0.5 0.48 0.8 0.32 0.16 0.4 Age Region Age Camp Age Type 0.24 0.12 0.3 Region Camp Region Type 0.08 0.2 Camp Type 0.1
57. ### Best-ﬁrst search for GA API Gender Age Region / Camp

Type Gender Age Gender Region Gender Camp Gender Type 0.6 0.4 0.2 0.5 0.48 0.8 0.32 0.16 0.4 Age Region Age Camp Age Type 0.24 0.12 0.3 Region Camp Region Type 0.08 0.2 Camp Type 0.1