forked from drvinceknight/MAT013
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExample_Challenge_Solution.html
140 lines (101 loc) · 4.5 KB
/
Example_Challenge_Solution.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>MAT013 - Example Challenge Solution</title>
<meta name="description" content="A short description of MAT013">
<meta name="author" content="Vincent Knight">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/simple.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h2>MAT013 - Example Challenge Solution</h2>
<p>
Vince Knight
</p>
<p>
<small><a href="http://www.vincent-knight.com"> www.vincent-knight.com </a></small>
</p>
</section>
<section data-markdown>
###The Problem
---
4 methods of playing a stochastic game: which one is better?
</section>
<section>
<h3>Pulling in the data</h3>
<hr>
<pre><code contenteditable>shut_the_box_data<-read.csv("Data_for_Analysis.csv")</code></pre>
</section>
<section>
<h3>Compartementalising the data</h3>
<hr>
<pre><code contenteditable>
Greedy<-data.frame(Score=shut_the_box_data$Greedy_Score,Game_Length=shut_the_box_data$Greedy_History)
Greedy$Method<-"greedy"
Random<-data.frame(Score=shut_the_box_data$Random_Score,Game_Length=shut_the_box_data$Random_History)
Random$Method<-"random"
Shortest<-data.frame(Score=shut_the_box_data$Shortest_Score,Game_Length=shut_the_box_data$Shortest_History)
Shortest$Method<-"shortest"
Longest<-data.frame(Score=shut_the_box_data$Longest_Score,Game_Length=shut_the_box_data$Longest_History)
Longest$Method<-"longest"
</code></pre>
</section>
<section>
<h3>Getting Summary Statistics</h3>
<hr>
<pre><code contenteditable>
mean(Random$Game_Length, na.rm=TRUE)
mean(Shortest$Game_Length, na.rm=TRUE)
mean(Longest$Game_Length, na.rm=TRUE)
mean(Greedy$Game_Length, na.rm=TRUE)
</code></pre>
</section>
<section>
<h3>Results</h3>
<hr>
(Demo of code, pictures, graph...?)
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'linear', // default/cube/page/concave/zoom/linear/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
// { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>