Skip to content

Instantly share code, notes, and snippets.

@Shamar
Created March 5, 2018 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shamar/d701f0e968c9396230365a27175a374d to your computer and use it in GitHub Desktop.
Save Shamar/d701f0e968c9396230365a27175a374d to your computer and use it in GitHub Desktop.
A definition of intelligence
type Knowledge = ([Set], [Function])
type Intelligence = (Perception, Knowledge) -> ([Action], Knowledge)
comprehension :: (Perception, Knowledge) -> Knowledge
imagination :: Knowledge -> [Prediction]
will :: [Prediction] -> [Decision]
execution :: ([Decision], Knowledge) ->[Action]
abstraction :: (Perception, Knowledge) -> Knowledge
-- Human Intelligence
-- NOTE: first we react to perceptions, then we learn
human :: Intelligence
human (perception, old_knowledge) = (actions, new_knowledge)
where new_knowledge = abstraction (perception, old_knowledge)
useful_knowledge = comprehension (perception, old_knowledge)
predictions = imagination useful_knowledge
decisions = will predictions
actions = execution (decisions, old_knowledge)
-- _Hypothetical_ Artificial General Intelligence
-- NOTE: it can learn first and then use the new knowledge to react
machine :: Intelligence
machine (perception, initial_knowledge) = (actions, new_knowledge)
where new_knowledge = abstraction (perception, initial_knowledge)
useful_knowledge = comprehension (perception, new_knowledge)
predictions = imagination useful_knowledge
decisions = will predictions
actions = execution (decisions, new_knowledge)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment