Post on 12-Feb-2017
Ben GoertzelCEO, Novamente LLC and Biomind LLC
CTO, Genescient CorpCo-founder, OpenCog ProjectVice Chairman, Humanity+
Adjunct Research Professor, Xiamen University, ChinaAdvisor, Singularity University and Singularity Institute
OpenCog:An Open Source Software Framework
&A Design & Vision for Advanced AGI
Aspects of AGI
• Philosophy of Mind
• Conception of General Intelligence
• Cognitive Architecture
• Software Architecture
• Environment & Tasks
• Developmental Roadmap
Philosophy of Mind
a mind is an evolving, autopoietic, self-referring set of patterns, associated with a system that’s interpreted as goal-achieving -- including patterns in the system and the world (and emergent
therebetween), and patterns regarding goal-achievement
2006 2010 2012 (?)
Conception of General Intelligence
Artificial General Intelligence (AGI)
Humans are, in a certain sense, general-purpose rather than narrowly specialized intelligences…
General intelligence may be loosely conceived as
“The ability of a system to achieve a variety of complex goals in a variety of complex environments using limited computational resources -- including goals and environments that were not anticipated at the time the system was created.”
memory
prediction
perception
action
goals
a mind uses
and
to do
of what
will achieve its
core operating principle of a general intelligence
Legg and Hutterʼs Definition of General Intelligence
Universal intelligence is a weighted average over all environments, of the intelligence of the agent in that environment
The weights assigned to environments are determined by the universal distribution, in which weight of an environment is (exponentially) inversely proportional to the length of the shortest program that computes it (on an assumed reference computer)
Goertzelʼs Definition of General Intelligence
The "pragmatic general intelligence" of an agent is the expected degree to which will achieve the goals specified in a certain goal distribution, in the environments specified in a certain environment distribution
Goertzelʼs Definition of Efficient General Intelligence
The "efficient pragmatic general intelligence" is the expected value over (goal, environment) pairs, of: the expected degree to which the agent will achieve the goal in the environment, normalized by the computational expense it will incur in doing so.
In real life, AGI is about making agents with high efficient pragmatic general intelligence relative to relevant classes of goals and environments
Defining the Intelligence of Real-World Agents
• Real-world intelligent systems do not always have explicit rewards or goals
• However, they can be locally approximated by goal-oriented systems, during each interval of time, and their intelligence can be estimated via the intelligence of these approximants
Defining the “Generality” of an Agentʼs Intelligence
The extent to which an agentʼs intelligence is general may be defined as the entropy of its environment-specific intelligence, evaluated according to a given prior distribution over environments
In this approach the generality of a systemʼs intelligence is orthogonal to its degree of intelligence
General intelligence in regard to the environments & goals for which humans evolved, and in which humans now operate, involves certain key competencies
Cognitive Architecture
Should we implement AGI via...
-- A single core complex cognitive process, supported by others as needed
-- Multiple simple processes interacting together, emergently yielding intelligence... ?
-- A number of complex cognitive processes, interacting together in a specific way? Glued together perhaps
using probabilistic & economic semantics?
The human brain seems involve a number of complex processes (modelable as algorithmic), interacting together in specified ways...
Which is critical?
-- The overall cognitive architecture?
-- The power of the learning algorithms?
-- Both? and they have to synergize well?
\
Which is critical?
-- The particulars of the system’s explicitly implemented processes and representations?
-- The structures and dynamics that emerge via complex self-organization, as the system grows and
learns?
-- Both? and they have to synergize well?
\
MotorSensory
Declarative Episodic AttentionalIntentional Procedural
OpenPsi
DeSTIN(vision / audition)
RewardHierarchy
Motor Control
Hierarchy
robot proxy
game proxy
memory
PLN (inference)
Pattern mining
conceptblending
dimensional embedding
MOSES Hillclimbing Internal simulation ECAN
(economic attention allocation
Language processing
DeclarativeProbabilistic Logic
Networks,concept blending,
language comprehension &
generation
Episodicinternal world
simulation engine
Attentional/Intentional
economic attention networks, adaptive
goal hierarchy
Sensoryhierarchy of memory/
processing units
ProceduralMOSES
(probabilistic evolutionary
learning),hillclimbing
cognitive synergy in OpenCog
In OpenCog, multiple cognitive processes act concurrently on the
same knowledge store
Explicit knowledge representation:
Nodes and links (collectively “Atoms”) that explicitly encode individual pieces of knowledge
Implicit knowledge representation:
Knowledge that is encoded in the coordinated structure or activity of a large set of nodes and links
Knowledge Representation in OpenCog
Nodes are typed and may •symbolize entities in the external world embody simple executable processes•symbolize abstract concepts•serve as components in relationship-webs signifying complex concepts or procedures.
Links are typed and may•be binary, unary or n-ary•point to nodes or links;•embody various types of relationships between concepts,percepts or actions.•The network of links is a web of relationships.
The two types of OpenCog Atoms: Nodes and Links
Atoms come with TruthValue and AttentionValue objects
TruthValue objects come in several forms, e.g.
Single probability values
SimpleTruthValues, consisting of (probability, count) pairs
IndefiniteTruthValues, consisting of tuples (Lower bound, Upper bound, confidence)
DistributionalTruthValues, each encompassing a first or second order probability distribution
AttentionValue objects contain information telling how much processor time and memory an Atom should get. Most simply an AttentionValue object contains
ShortTermImportance (STI) value telling how much processor time the Atom should get in the near future
LongTermImportance (LTI) value telling how important it is to retain the Atom in memory
VLTI bit telling whether, if the Atom is removed from RAM, it should be kept on disk
There are multiple types of Nodes
Each type has its own semantics
Informally, we may divide the node types into multiple “varieties”
The precise collection of Atom types has changed over the years as we have developed the OpenCog system
Someday, a future version may learn its own Atom types
There are multiple types of LinksEach type has its own semantics
Informally, we may divide the link types into multiple “varieties”
Member Ben_Goertzel Goertzel_Family
Member Anchovy_Goertzel Goertzel_Family <.8>
("Anchovy" is a rabbit, so her membership degree in the Goertzel family is less than 1)
AsymmetricHebbianLink Ben_Goertzel insane <.5>
(this means that when "Ben Goertzel" is mentioned, "insane" is often also mentioned)
SymmetricHebbianLink dog pet
SymmetricHebbianLink ConceptNode: dog ConceptNode: pet
ContextLink USA SymmetricHebbianLink dog pet <.8>
ContextLink Korea SymmetricHebbianLink dog pet <.5>
ExecutionLink + ListLink 2 3 5
ExecutionLink SchemaNode: + ListLink NumberNode: 2 NumberNode: 3 NumberNode: 5
ExecutionLink kick ball_44
ExecutionLink SchemaNode: kick SemeNode: ball_44
ExecutionLink give ListLink (ChenShuo, ball_44)
InheritanceLink cat animal
InheritanceLink animal cat <.01>
InheritanceLink animal cat <.01,.95>
SubsetLink parrot human <0>
IntensionalInheritanceLink parrot human <.6>
IntensionalInheritanceLink frog human <.03>
EvaluationLink <.8> PredicateNode: is_silly SemeNode: Ben_Goertzel
ForAllLink VariableNode: $X, $Y ImplicationLink <.7> AndLink InheritanceLink $X man InheritanceLink $Y woman EvaluationLink love ListLink ($X, $Y) EvaluationLink overestimate <.9> ListLink $X EvaluationLink beauty $X
Ben Goertzel is silly
When a man loves a woman, he greatly overestimates her beauty
MindAgents are objects that act on the Atomspace: modifying, adding and/or removing Atoms
MindAgents’ activities are scheduled by a Scheduler: the simplest Scheduler would just cycle through all available MindAgents
OpenCog involves a carefully constructed combination of MindAgents, intended to reinforce rather than confuse each other!
MOSES Probabilistic Evolutionary Learning
Combines the power of two leading AI paradigms: evolutionary and probabilistic
learning
Extremely broad applicability. Successful track record in bioinformatics, text and data mining,
and virtual agent control.
Moshe Looks 2006 PhD thesis: metacog.org
Probabilistic Logic NetworksA highly general, practical integration of
probability theory and symbolic logic.
Extremely broad applicability. Successful track record in bio text mining, virtual agent control.
Based on mathematics described in Probabilistic Logic Networks, published by Springer in 2008
Two Key Algorithms for Procedural and Declarative Knowledge Creation
Concept Blending
Map Encapsulation
Economic Attention Allocation
Each node or link in the AtomSpace is tagged with a probabilistic truth value, and also with an “attention value”, containing Short-Term Importance and Long-Term Importance components.An artificial-economics-based process is used to update these attention values dynamically -- a complex, adaptive nonlinear process.
Psi Architecture Overviewfigure from “Principles of Synthetic Intelligence” by Joscha Bach
Symbol Grounding in Psifigure from “Principles of Synthetic Intelligence” by Joscha Bach
Joscha Bach’s MicroPsi Architecturefigure from “Principles of Synthetic Intelligence” by Joscha Bach
Basic net-entity from which MicroPsi’s node types,comprising its dynamic
knowledge representation,are composed
Psi OpenCog
Memory AtomSpace (weighted semantic hypergraph), Procedure repository, space/time index servers, etc.
Demands Implemented as GroundedPredicateNodes
Urges Called “Ubergoals”, these are also GPNs, with truth values calculated in terms of corresponding Demands
Urgency For goal Atoms, the ShortTermImportance value indicates urgency
Pleasure A GPN whose internal TV evaluation function compares actual to expected levels of Ubergoal satisfaction
Goals Atoms (both Ubergoals and learned subgoals) in the system’s GoalPool
Motive Selection Carried out as a function of Economic Attention Allocation, which dispenses STI funds to goals
Action Selection Similar to in Psi, OpenPsi selects composite procedures to execute based on its inferences of what may best achieve its goals
Planning Arises as a consequence of multiple cognitive processes, including PLN, MOSES and ECAN
Modulators (e.g. activation, resolution level, certainty,
selection threshold)
System parameters, representable as GPNs, with TVs estimated by appropriate heuristic formulae
Other approaches, e.g. Itamar Arel’s DeSTIN, follow similar principles with different details -- a general term I’ve used is “compositional spatiotemporal
deep learning networks”. These may be hybridized with OpenCog.
adviceinput
below
belowbelow
between
aligned on axis perpendicular to
mouth-nose-eyes axis...
visual patterns (e.g. DeSTIN centroids) corresponding to
the semantic perception node linked to “human
eye”
concept node
phrase node
“human eye”
referencelink
PERCEPTUAL CSDLN
SEMANTIC-PERCEPTUAL CSDLN
COGNITIVESEMANTICNETWORK
referencelink
referencelink
semantic HTM nodes/linksformed by pattern mining
perceptual HTM
semantic HTM provides probabilistic biasing to
perceptual HTM
aligned on axis perpendicular to
eyes axis
CSDLN = “Compositional Spatiotemporal Deep Learning
Network, e.g. HTM, DeSTIN,...
grasp object
The motoric hierarchy node corresponding to a particular set of servomotors, might for instance contain
clusters of paths through configuration space that the servomotors have historically followed.
MOTORIC CSDLN
SEMANTIC- MOTORIC CSDLN
rotate arm toward object
raise or lower arm toward object
raise or lower arm toward default position
after
after
before/after/simultaneous
get object
adviceinput
COGNITIVESEMANTICNETWORK
“get”
phrase nodeconcept node
referencelink
referencelink
referencelink
motor patterns (e.g. centroids) corresponding to the semantic motoric
node “raise or lower arm toward object”
SEMANTIC- MOTORIC CSDLNSEMANTIC-PERCEPTUAL CSDLN
SEMANTIC GOAL CSDLN
COGNITIVESEMANTICNETWORK
possess food
eat food
maintainappropriate
fullness
get object(e.g. food)
see food & get food --> possess food
see food
see meat see sandwich
... ...
“get”Hungry & eat food--> maintain appropriate fullness
How --->
Helps |
\|/
Map formation Goal system Simulation Sensorimotor
pattern recognition
Uncertain inference Creates new concepts and relationships, enabling briefer useful inference trails
Goal refinement enables more careful goal-based inference pruning
- Simulations provide a method of testing speculative inferential conclusions
- Simulations suggest hypotheses to be explored via inference
Creates new concepts and relationships, enabling briefer useful inference trails
Supervised procedure learning
Creates new procedures to be used as modules in candidate procedures
Goal refinement allows more precise definition of fitness functions, making procedure learningʼs job easier
Simulation provides a method of “fitness estimation” allowing inexpensive testing of candidate procedures
Extraction of sensorimotor patterns allows creation of abstracted fitness functions for (inferentially and simulatively) evaluating procedures guiding real-world actions
Attention allocation Creates new concepts grouping “attentionally related” memory items, enabling AA to find subtler attentional patterns involving these nodes
Goal refinement allows more accurately goal-driven allocation of attention
Simulation provides data for attention allocation -- allowing attentional information to be extracted from co-occurences observed in simulation
Creates concepts grouping “attentionally related” memory items, enabling AA to find subtler attentional patterns involving these nodes
Concept creation Creates new concepts to be fed into other concept creation mechanisms
Goal refinement provides more precise definition of criteria via which new concepts are created
Utility of concepts may be assessed via creating simulated entities embodying the new concepts and seeing what they lead to in simulation
Creates new concepts to be fed into other concept creation mechanisms
How --->
Helps |
\|/
Uncertain inference Supervised procedure learning
Attention allocation Concept creation
Uncertain inference NA When inference gets stuck in an inference trail, it can ask procedure learning to learn new patterns regarding concepts in the inference trail (if there is adequate data regarding the concepts)
Importance levels allow pruning of inference trees
Provides new concepts, allowing briefer useful inference trails
Supervised procedure learning
Inference can be used to allow prior experience to guide each instance of procedure learning.
NA Importance levels may be used to bias choices made in the course of procedure learning
(e.g. in OCP, in the fitness evaluation and representation-building phases of MOSES)
Provides new concepts, allowing compacter programs using new concepts in various roles
Attention allocation Enables inference of new HebbianLinks and HebbianPredicates from existing ones
Procedure learning can recognize patterns in historical system activity, which are then used to build concepts and relationships guidng attention allocation
NA Combination of concepts formed via map formation, may lead to new concepts that even better direct attention
Concept creation Allows inferential assessment of the value of new concepts
Procedure learning can be used to search for high-quality blends of existing concepts (using e.g. inferential and attentional knowledge in the fitness functions)
Allows assessment of the value of new concepts based on historical attentional knowledge
NA
How --->
Helps |
\|/
Uncertain inference Supervised procedure learning
Attention allocation Concept creation
Map formation Speculative inference can help map formation guess which maps to hunt for
Procedure learning can be used to search for maps that are more complex than mere “co-occurrence”
Attention allocation provides the raw data for map formation
No significant direct synergy
Goal system Inference can carry out goal refinement
No significant direct synergy
Flow of importance among subgoals determines which subgoals get used, versus being forgotten
Concept creation can be used to provide raw data for goal refinement (e.g. a new subgoal that blends two others)
Simulation In order to provide data for setting up simulations, inference will often be needed
No significant direct synergy
Attention allocation tells which portions of a simulation need to be run in more detail
No significant direct synergy
Sensorimotor
pattern recognition
Speculative inference helps fill in gaps in sensory data
Procedure learning can be used to find subtle patterns in sensorimotor data
Attention allocation guides pattern recognition via indicating which sensorimotor stimuli and patterns tend to be associatively linked
New concepts may be created that then are found to serve as significant patterns in sensorimotor data
How --->
Helps |
\|/
Map formation Goal system Simulation Sensorimotor
pattern
recognition
Map formation NA Map formation may focus on finding maps related to subgoals, and good subgoal refinement helps here
No significant direct synergy
No significant direct synergy
Goal system Concepts formed from maps may be useful raw material for forming subgoals
NA No significant direct synergy
No significant direct synergy
Simulation No significant direct synergy
No significant direct synergy
NA Presence of recognized sensorimotor patterns may be used to judge whether a simulation is sufficiently accurate
Sensorimotor
pattern
recognition
Concepts formed from maps may usefully guide sensorimotor pattern search
Directing pattern search toward patterns pertinent to subgoals, may make the task far easier
Patterns recognized in simulations may then be checked for presence in real sensorimotor data
NA
Software Architecture
Currently the OpenCog “core (AtomSpace, scheduler, comms,
saving to disk, etc.) is C++ for Unix, with an STL-based API
MindAgents are currently
coded in C++ or Python.
Some MindAgents also invoke
external Java processes
Environment & Tasks
2009 AGI Roadmap Workshop
How Important Is Embodiment?
Some AI theorists believe that robotic embodiment is necessary for the achievement of powerful AGI
Others believe embodiment is entirely unnecessary
We believe embodiment is extremely convenient for AGI though perhaps not strictly necessary; and that virtual-world embodiment is an important, pragmatic and scalable approach to pursue alongside physical-robot embodiment
Current virtual world platforms have some fairly severe limitations, which fortunately can be remedied with effort
Object-object interactions are oversimplified, making tool use difficult
Agent control relies on animations and other simplified mechanisms, rather than having virtual servomotors associated with each joint of an agent’s skeleton
Partial solution: Integration of a robot simulator with a virtual world engine
Player / Gazebo: 3D robot control + simulation framework
OpenSim: open-source virtual world
It seems feasible to replace OpenSim’s physics engine with appropriate components of Player/Gazebo, and make coordinated OpenSim client modifications
+
Current Virtual Worlds lack fluids, powders, pastes, fabrics … they donʼt completely implement
“naïve physics”
One likely solution: bead physics
Spherical beads with specially designed adhesion properties can emulate fluids, fabrics, pastes, strings, rubber bands, etc.
Bead physics can be added to virtual world physics engines
Possible solution: build robots from “macrocells” -- flexible ball-like units that can stretch into different shapes, sense the environment, and pass power and
information to each other
Current robots are made mainly of inert parts -- very few of their parts are sensors or actuators...
This shows OpenCog oscillating between the robot's "home" and batteries, as a result of its quests to fulfill integrity and energy demands respectively. After a few movements back and forth, it also shows the Psi monitor updating graphs of the Psi variables (note the updates are synchronized between graphs).
This video shows OpenCog spelled out in blocks, as a 3D path finding mission. It also shows the demand for finding a battery to restore energy.
Subsequent to finding the battery, the avatar asks the player for a battery. The player then pushes a button to make one appear. A video transition happens where some footage was cut out (involving more observations of the button generating food), and the video then shows the OpenCog avatar using the button to create food for itself.
Developmental Roadmap
Piagetan Stages of Development
Piaget Meets Uncertain Inference
• 2011-2012: A Proto-AGI Virtual Agent
• 2013-2014: A Complete, Integrated Proto-AGI Mind (Piagetan concrete)
• 2015-2016: Advanced Learning and Reasoning (Piagetan formal)
• 2017-2018: AGI Experts
• 2019-2021: Full-On Human Level AGI
• 2021-2023: Advanced Self-Improvement (Piagetan reflexive)
• 6 month from start (now): Unity-based minecraft-like world initially built, proxy to Unity built, 3D pathfinding, frequent subgraph miner designed/built, PLN and “embodiment” (body-control) systems debugged/refactored, PLN based planner built, OpenPsi motivation/emotion system implemented
• 12 month (end of 2011): New artwork/animations integrated into world, further behaviors/interactions for objects scripted/tested, PLN further refactored and simple temporal/spatial reasoning integrated, reinforcement/imitation learning integrated (and interface btw this learning and OpenPsi created), dialogue system refactored/improved, appropriate emotional responses demostrated. Reliable live demo!
• 18 month (mid-2012): Attention allocation integrated, complex planning demonstrated, learning & reasoning integrated, linguistic question answering and command demonstrated. Exciting live demo...
• 24 month (end of 2012): Software toolkit built out to enable tractable integration into games. Demo improvements. OpenCog 1.0 release. Intelligence improvements
OpenCog Hong Kong Project
• 2010: Simplistic integration of OpenCog with Nao robot for navigation, command-following; implementation of English language generation for OpenCog
• 2011: Re-implementation of Itamar Arel’s team’s DeSTIN architecture in CUDA for GPU computing: initial version completed June 2011, refinements underway
• 2012-13: Integration of DeSTIN with OpenCog using intermediate “semantic compositional spatiotemporal deep learning network”; integration of robotic movement control system with OpenCog
• 2013-2014: OpenCog-powered intelligent robotics
Xiamen University BLISS Lab
Interim Applications
biomedicalinformatics
financial prediction /
analytics
video games / virtual worlds
robot toys
service robots
information retrieval
etc. !!!
The natural synergy between advanced AI and gaming/virtual worlds has been avidly discussed for at least a decade, and is now finally becoming a practical reality
For a readable journalistic treatment of the application of machine learning to study longevity in
fruit flies, see
“AIs, Superflies and the Path to Immortality”
in H+ Magazine, hplusmagazine.com
Ensemble based machine learning does well here, but appropriate OpenCog integration could do much better by allowing a vast variety of available bio
datasets to be brought to bear on the analysis of any one dataset.