Created
November 15, 2022 15:34
-
-
Save smwhr/8fe3ef7db707eb6f8068a1b3c7222689 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// KNOWLEDGE FUNCTIONS | |
VAR knowledgeState = () | |
=== function learn(x) === | |
// learn this fact | |
~ knowledgeState += x | |
=== function learnt(x) === | |
// have you learnt this fact, or indeed a stronger one | |
~ return highest_state_for_set_of_state(x) >= x | |
=== function between(x, y) === | |
// are you between two ideas? Not necessarily in the same knowledge tree. | |
~ return learnt(x) && not learnt(y) | |
=== function think(x) === | |
// is this your current "strongest" idea in this knowledge set? | |
~ return highest_state_for_set_of_state(x) == x | |
=== function highest_state_for_set_of_state(x) === | |
~ return LIST_MAX(knowledgeState ^ LIST_ALL(x)) | |
=== function did_learn(x) === | |
// did you learn this particular fact? | |
~ return knowledgeState ? x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment