summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/habit-starts/learning-parts.hpp
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2019-12-10 09:07:31 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2019-12-10 09:07:31 -0800
commit014dc185aae42e61cb6d0a6c3033c9cf5f45c732 (patch)
treefc0c3a7371df95bfbdb74f20cc66ddc036d656b3 /starts/meaning-vm/habit-starts/learning-parts.hpp
parent3a054408336ab5754a9da6050bf31110f2211c89 (diff)
downloadstandingwithresilience-014dc185aae42e61cb6d0a6c3033c9cf5f45c732.tar.gz
standingwithresilience-014dc185aae42e61cb6d0a6c3033c9cf5f45c732.zip
files not included
Diffstat (limited to 'starts/meaning-vm/habit-starts/learning-parts.hpp')
-rw-r--r--starts/meaning-vm/habit-starts/learning-parts.hpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/starts/meaning-vm/habit-starts/learning-parts.hpp b/starts/meaning-vm/habit-starts/learning-parts.hpp
new file mode 100644
index 0000000..a446a1d
--- /dev/null
+++ b/starts/meaning-vm/habit-starts/learning-parts.hpp
@@ -0,0 +1,41 @@
+#pragma once
+
+#include "common.hpp"
+
+namespace habitstarts {
+
+// first need ability to trigger on stuff.
+// whenever A happens, do B.
+// stop doing B whenever A happens.
+// when A happens, do B once.
+
+decl(action, happens, context);
+decl(happened); // happened-habit(ctx) performs actions associated with ctx[happens]
+decl(whenever); // whenever-habit(ctx) stores to do ctx[action] when ctx[happens] happens
+ // providing ctx[action-context]
+decl(stop); decl(when); // stop-when-habit(ctx) removes doing ctx[happens] on ctx[event]
+decl(once); // once-habit(ctx) stores to do ctx[action] the next time ctx[happens] happens
+ // providing ctx[action-context]
+
+/*
+ Testing metric: runs when event is fired, measures time between
+ event and right time. if [usual] time is less than ever before, success.
+ if time is significantly more than behavior's norm, failure.
+ Convert to English: try to have the event happen at the right time.
+*/
+// starting out by making a judgement habit that occasionally provides 'good' or 'bad' to things, to lead how to develop
+ // for fairness, seems reasonable to provide a pattern showing reason for good or bad
+//
+
+// set to do 1ce at goal time:
+// ctx X
+// set to do 1ce on goal time:
+// set next-happened (local)
+// delay (a sequence of habits that do nothing)
+// if next-happened is set
+// remove something from delay
+// otherwise
+// add something to delay (wait for unspecified user-perceptible time, selected from discrete set)
+// provide adjusted delay to next context
+
+}