forked from hakimel/reveal.js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rulesAsCode_LOWG.html
341 lines (271 loc) · 11.2 KB
/
rulesAsCode_LOWG.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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Rules As Code</title>
<meta name="description" content="What it means, and why we're doing it!">
<meta name="author" content="Sara Falamaki">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/sky.css" id="theme">
<link rel="stylesheet" href="lib/css/monokai.css">
<script src="plugin/highlight/highlight.js"></script>
<script>
Reveal.initialize({
plugins: [ RevealHighlight ]
});
</script>
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/monokai.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</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>
<h1>Rules as Code</h1>
<h3>What it means, and why we're doing it</h3>
<p>
<small>Transformation Unit, DCS</small>
</p>
</section>
<!-- Example of nested vertical slides -->
<section>
<p>Often the interaction between rules is incomprehensible to mere humans...</p>
<img width="40%" src="img/parking.jpg" alt="Down arrow">
</section>
<section>
<h3>The need for Rules as code</h3>
<img width="90%" src="img/whyRAC.png" alt="Why RAC?">
</section>
<section>
<h3>Lets do it once</h3>
<p>So that everyone uses the same rules
<br>and<br> Rule changes are propagated across applications </p>
</section>
<section>
<h2>Lets do it better</h2>
<ul>
<li>By helping a computer to understand the rules, we ensure they are logical and make sense</li>
<li>Rules and computer systems become easier to integrate with, test, and modify</li>
<li>By giving customers the correct interpretation, faster - we improve their experience</li>
</ul>
</section>
<section>
<h3>Rules as code has the potential to:</h3>
<ul>
<li>Improve outcomes</li>
<li>Increase efficiency</li>
<li>Help make better rules</li>
</ul>
<p>... for both our customers and staff</p>
</section>
</section>
<section>
<h3>Benefits of Rules as code</h3>
<img width="100%" src="img/RaC_benefits.png" alt="Benefits of Rules as code">
</section>
<section>
<h3>What are we doing?</h3>
<ul>
<li>Manually translating <em>prescriptive</em> rules into computer code</li>
<li>Publishing this translation, so computer systems can use it</li>
<li>Testing our interpretation of the rules with clear, reproducible test data</li>
</ul>
</section>
<section>
<h3>What are we NOT doing?</h3>
<p class="fragment shrink">AI</p>
<p class="fragment shrink">Machine Learning</p>
<p class="fragment shrink">Law, equity, judgements</p>
<p class="fragment shrink">RoboCops</p>
<p class="fragment shrink">RoboJudges</p>
<p class="fragment shrink">RoboDebt</p>
<p class="fragment shrink">Automatic Anything</p>
<p class="fragment fade-in-then-semi-out">... Anything scary!</p>
</section>
<section>
<h3>Core value proposition</h3>
<img width="83%" src="img/architecture.png" alt="Platform and process">
</section>
<section>
<h3>How Openfisca has been setup in New South Wales</h3>
<img width="93%" src="img/OF_arch.png" alt="Openfisca Architecture">
<p><small>Modular architecture allows for more rulesets/extensions to be added easily</small></p>
</section>
<section>
<h4>Potential to integrate <br> with other systems</h4>
<img width="60%" src="img/licensing.png" alt="Future ">
</section>
<!--
<section>
<section data-background-iframe="https://smartstart.services.govt.nz/financial-help" data-background-interactive>
<div style="position: absolute; width: 40%; right: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.5), 0 5px 25px rgba(0,0,0,0.2); background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px; font-size: 20px; text-align: left;">
<h2>What does it look like?</h2>
<p>This is a questionaire that can be used to determine what financial help you're eligible for in New Zealand, created using Rules As Code</p>
</div>
</section>
</section>
<section>
<section data-background-iframe="https://mes-aides.gouv.fr/" data-background-interactive>
<div style="position: absolute; width: 40%; right: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.5), 0 5px 25px rgba(0,0,0,0.2); background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px; font-size: 20px; text-align: left;">
<h2>What does it look like?</h2>
<p>Here is a French example</p>
</div>
</section>
</section>
!-->
<section>
<h2>Community Gaming Regulation 2020 </h2>
<ul>
<li><a href="https://www.fairtrading.nsw.gov.au/community-gaming/community-gaming-regulation-check/_nocache" target="_blank">Web UI</a></li>
<li><a href="https://github.com/Openfisca-NSW/openfisca_nsw_community_gaming" target="_blank">Coded open-source rules</a></li>
<li><a href="https://nsw-rules-dev.herokuapp.com/" target="_blank">NSW Rules API Documentation</a></li>
</ul>
</section>
<section>
<h3> Concept modelling</h3>
<img width="70%" src="img/concept-model.png" alt="Concept Model?">
</section>
<section>
<h2>Test Case - Example</h2>
<pre><code data-trim data-noescape>
- name: Organisation is conducting a charity housie that is permitted
period: 2020-07
input:
is_charity: True
gaming_activity_is_charity_housie: True
proceeds_to_benefitting_organisation: 3900
gross_proceeds_from_gaming_activity: 4000
total_expenses_for_conducting_gaming_activity: 100
total_prize_value_from_single_gaming_session: 2000
number_of_tickets: 40
output:
charity_housie__game_meets_criteria: True
charity_housie__authority_required: False
</code></pre>
</section>
<section>
<h3>Improved Customer Experience </h3>
<img width="120%" src="img/BeforeAfter.png">
</section>
<!--
<section>
<section>
<h2>How does it work?</h2>
<ol>
<li>Choose legislation/regulation to translate, or co-author new regulation/legislation</li>
<li>Concept Modelling</li>
<li>Code Concepts</li>
<li>Test understanding and code with test scenarios</li>
<li>Deploy API, and integrate services with it</li>
</ol>
</section>
<section>
<h2>Co-author new regulation using Better Rules Approach</h2>
</section>
<section>
<img width="60%" src="img/regulation.png" alt="CGR 2020">
</section>
<section>
<h2>Concept Modelling</h2>
<img width="60%" src="img/concept-model.png" alt="Concept Model">
</section>
<section>
<pre><code data-trim data-noescape>
def formula(organisation, period, parameters):
return (
organisation('is_charity', period) *
organisation('gaming_activity_is_charity_housie', period) *
(organisation('proceeds_to_benefitting_organisation', period)
>= parameters(period).permitted_games.housie.min_gross_proceeds_to_benefit_org *
organisation('gross_proceeds_from_gaming_activity', period)) *
(organisation('total_expenses_for_conducting_gaming_activity', period)
<= parameters(period).permitted_games.housie.max_expenses.charity_housie *
organisation('gross_proceeds_from_gaming_activity', period)) *
(organisation('total_prize_value_from_single_gaming_session', period)
<= parameters(period).permitted_games.housie.max_value_of_prize_per_session.charity_housie) *
(organisation('total_prize_value_from_single_gaming_session', period)
<= parameters(period).permitted_games.housie.max_value_of_prizes_per_gross_proceeds *
organisation('gross_proceeds_from_gaming_activity', period)) *
(organisation('number_of_tickets', period)
<= parameters(period).permitted_games.housie.max_no_of_tickets))
</code></pre>
</section>
!-->
<!--
<section>
<h2>Test Case 2</h2>
<pre><code data-trim data-noescape>
- name: Organisation is not a charity, hence charity housie is not permitted
period: 2020-07
input:
is_charity: False
gaming_activity_is_charity_housie: True
proceeds_to_benefitting_organisation: 3900
gross_proceeds_from_gaming_activity: 4000
total_expenses_for_conducting_gaming_activity: 100
total_prize_value_from_single_gaming_session: 2000
number_of_tickets: 40
output:
charity_housie__game_meets_criteria: False
charity_housie__authority_required: False
</code></pre>
</section>
<section data-background-iframe="https://nsw-rules-dev.herokuapp.com/charity_housie__game_meets_criteria" data-background-interactive>
</section>
</section>
!-->
<section>
<h3>Scalability</h3>
<p>One of the best part about Rules as code is the reusability of the code </p>
<img width="35%" src="img/Graph.png" alt="Graph">
<small>We only have to code concepts such as, ‘What is a small business?' or 'The number of business days in a year’ once!</small>
</section>
<section>
<img width="90%" src="img/media.png" alt="RaC in the media">
</section>
<section>
<p>Let us know how we can help you make compliance easier for your customers! </p>
</section>
<section>
<h2>Questions?</h2>
</section>
</div>
</div>
<script src="js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
center: true,
hash: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'plugin/markdown/marked.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' },
{ src: 'plugin/search/search.js', async: true },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>