首页 理论 架构 工程 文档 白皮书 著作 研究 案例 下载 博客 关于 开始使用 →

第二十二篇 Experience

第二十二篇 Experience

第70章 Learning

第69章定义了 Experience

Experience 解决的是:

过去发生过什么?

第70章的 Learning 进一步解决:

从这些信息和经历中,获得了什么新的知识,以及这些知识如何更新 SAI 的能力资源?

在 SAI 中,Learning 不是简单地“把数据存起来”,也不是简单地“记住经验”。

其核心过程是:

Information
    ↓
Perception
    ↓
Cognition
    ↓
Memory
    ↓
Feedback
    ↓
Experience
    ↓
Learning
    ↓
Knowledge
    ↓
Ability
    ↓
Memory Update

因此:

Learning 是 SAI 对新获得的信息、反馈、经验和已有记忆进行整理、比较、验证和更新,从而获得或修正知识与能力资源的过程。


1. Learning 定义

Learning 是 SAI 从外部信息、内部反馈、历史经验和已有记忆中获取、整理、验证并更新知识资源的过程。

基本模型:

Learning
=
Input
+
Comparison
+
Validation
+
Extraction
+
Knowledge Update
+
Memory Update

更完整地表示:

Information
+
Feedback
+
Experience
+
Memory
        ↓
     Learning
        ↓
     Knowledge
        ↓
      Ability

Learning 的最终结果不是简单增加一条数据,而是可能产生:

  • 新知识
  • 新事实
  • 新关系
  • 新规则
  • 新经验
  • 知识修正
  • 知识失效
  • 能力更新
  • 记忆更新

因此:

Learning ≠ Storage
Learning ≠ Memory
Learning ≠ Experience
Learning ≠ Knowledge

它们之间是不同层次。


2. Learning 输入

Learning 需要输入。

主要输入包括:

Feedback
Experience
Knowledge
Memory
Information

可以形成:

             Learning Input
                  │
       ┌──────────┼──────────┐
       ↓          ↓          ↓
   Feedback   Experience   Memory
       │          │          │
       └──────────┼──────────┘
                  ↓
              Learning
                  ↓
              Knowledge
                  ↓
               Ability

同时,新的 Information 也可以直接进入 Learning 流程:

External Information
        ↓
Perception
        ↓
Cognition
        ↓
Learning

Learning 输入的作用

Information

提供新的外部信息。

Information → Learning

Feedback

提供行为执行后的结果。

Action → Feedback → Learning

Experience

提供完整的历史经历。

Condition
→ Action
→ Result
→ Feedback
→ Experience

Memory

提供已有认知资源。

Old Memory + New Information
        ↓
      Learning

Knowledge

提供已有知识,用于比较和更新。

Old Knowledge
      +
New Experience
      ↓
Learning
      ↓
Updated Knowledge

3. Feedback

Feedback 是 Learning 的重要输入之一。

第68章已经定义:

Action
 ↓
Result
 ↓
Feedback

Feedback 告诉 SAI:

刚才实际发生了什么。

例如:

Action:
Fan_A.powerOn

反馈:

Feedback
{
    state: "SUCCESS",
    temperature_before: 32,
    temperature_after: 29
}

Learning 可以从中获得新的信息:

temperature = 32
    ↓
Fan_A.powerOn
    ↓
temperature = 29

但是:

一次 Feedback 本身不一定立即形成稳定知识。

需要进行:

Feedback
 ↓
Validation
 ↓
Comparison
 ↓
Experience
 ↓
Learning

如果反馈存在错误、异常或者信息不完整,则不能直接作为可靠知识更新。


4. Experience

Experience 是 Learning 最重要的历史输入之一。

第69章定义:

Experience
=
Condition
+
Action
+
Process
+
Result
+
Feedback

例如:

Experience
{
    condition:
    {
        temperature: 32
    },

    action:
    {
        device: "Fan_A",
        method: "powerOn"
    },

    result:
    {
        state: "ON"
    },

    feedback:
    {
        temperature: 29
    },

    outcome: "SUCCESS"
}

Learning 对 Experience 进行:

读取
 ↓
比较
 ↓
分类
 ↓
验证
 ↓
提取
 ↓
形成知识

如果只有一次:

32℃
→ 开风扇
→ 29℃

只能说明:

在这一次经历中出现了这样的结果。

如果存在多次相似经验:

32℃ → Fan ON → 29℃
31℃ → Fan ON → 28℃
33℃ → Fan ON → 30℃

那么 Learning 就可以发现更加稳定的关系。

例如:

temperature >= 30
        ↓
Fan_A.powerOn
        ↓
temperature tends to decrease

这里仍然需要根据实际数据和验证结果决定知识状态,而不能因为几次成功就直接认定为绝对规则。


5. Knowledge

Knowledge 是 Learning 形成和更新的重要资源。

第70章中的关系可以表示为:

Input
 ↓
Learning
 ↓
Knowledge

Knowledge 可以包括:

Fact
Relation
Rule
Condition
Object
Property
State
Method
Experience-derived Knowledge

例如:

Knowledge
{
    condition:
    {
        temperature: ">= 30"
    },

    action:
    {
        device: "Fan_A",
        method: "powerOn"
    },

    result:
    {
        expected: "temperature_reduction"
    },

    state: "ACTIVE"
}

Knowledge 与 Experience 的区别:

Experience
→ 过去发生过什么

Knowledge
→ 从已有信息和经验中形成的可使用知识资源

例如:

Experience:
32℃ → 开风扇 → 29℃

Knowledge:
高温条件下启动风扇可能降低温度

Knowledge 可以进一步进入:

Reasoning
Decision
Ability

6. Ability

Learning 的另一个重要结果是 Ability。

前面定义:

Knowledge 是能力资源,Ability 是能力应用。

因此 Learning 不应该简单地理解为:

Learning → Ability = 自动增加功能

而应该理解为:

Learning
 ↓
Knowledge Resource
 ↓
Ability Resource Update
 ↓
Ability Application

例如 SAI 原来只有:

Ability:
PowerControl

经过新的知识和设备信息学习后,发现:

Fan_A
支持:
PowerControl
SpeedControl

那么系统可以形成新的能力资源:

AbilityResource
{
    target: "Fan_A",
    ability: "SpeedControl",
    method: "setSpeed",
    state: "AVAILABLE"
}

以后:

Decision
 ↓
Ability Check
 ↓
setSpeed()
 ↓
Action

所以:

Knowledge → Ability Resource → Ability Application

需要明确:

Learning 获取和更新能力资源;Ability 的具体应用发生在行为和行动阶段。


7. Memory

Learning 与 Memory 是双向关系。

一方面:

Memory → Learning

Learning 需要读取已有记忆。

另一方面:

Learning → Memory

Learning 产生的新知识和更新结果需要重新保存。

形成:

Old Memory
     ↓
   Learning
     ↓
New Knowledge
     ↓
Memory Update

例如原有记忆:

FactMemory
{
    subject: "Fan_A",
    predicate: "speed",
    value: 1
}

新的设备反馈:

Fan_A.speed = 3

Learning 发现:

旧值 = 1
新值 = 3

经过验证后:

Memory Update

形成:

Fan_A.speed = 3

必要时保存历史:

History
{
    old_value: 1,
    new_value: 3,
    source: "DEVICE_FEEDBACK"
}

因此:

Memory
    ↓
提供历史依据

Learning
    ↓
判断和更新

Memory
    ↓
保存新的认知资源

8. Learning Result

Learning 完成之后,需要形成明确的 Learning Result。

不能仅仅返回:

SUCCESS

因为 Learning 可能产生不同类型的结果。

基本结构:

LearningResult
{
    id
    input
    type
    knowledge
    changes
    memory_update
    ability_update
    state
    source
    created_at
}

例如:

LearningResult
{
    id: "LR_1001",

    input:
    {
        experience: "EXP_1001"
    },

    type: "KNOWLEDGE_UPDATE",

    knowledge:
    {
        condition: "temperature >= 30",
        action: "Fan_A.powerOn",
        result: "temperature_reduction"
    },

    changes:
    [
        "new knowledge created"
    ],

    memory_update:
    {
        state: "UPDATED"
    },

    ability_update:
    {
        state: "UNCHANGED"
    },

    state: "SUCCESS",

    source: "EXPERIENCE"
}

Learning Result 状态

可以定义:

NEW
PROCESSING
SUCCESS
UPDATED
NO_CHANGE
UNCERTAIN
CONFLICT
FAILED
INVALID

例如:

新知识

state = SUCCESS

已有知识被修正

state = UPDATED

新信息没有产生变化

state = NO_CHANGE

信息不足

state = UNCERTAIN

与已有知识冲突

state = CONFLICT

输入无效

state = INVALID

这样 Learning 的结果是可追踪的。


9. Learning Update

Learning Update 是 Learning 的最终重要环节。

它负责把经过判断后的学习结果更新到:

Knowledge
Memory
Experience
Ability Resource

基本过程:

Learning Input
      ↓
Validation
      ↓
Comparison
      ↓
Evaluation
      ↓
Learning Result
      ↓
Update
      ├──→ Knowledge
      ├──→ Memory
      ├──→ Experience
      └──→ Ability Resource

Knowledge Update

例如原知识:

Fan_A
maximum_speed = 3

新的可靠设备信息:

maximum_speed = 5

经过验证:

Old Knowledge
      ↓
New Information
      ↓
Comparison
      ↓
Validation
      ↓
Knowledge Update

形成:

maximum_speed = 5

Memory Update

更新已有记忆:

Old:
Fan_A.speed = 1

New:
Fan_A.speed = 3

必要时保存历史:

1 → 3

因此:

Learning Update 不应该无条件覆盖旧信息。

应该先检查:

Source
Validity
Time
Conflict
State
Confidence

Ability Update

如果新的知识确认设备具备新的能力:

Device:
Fan_A

New Knowledge:
supports SpeedControl

可以更新:

AbilityResource
{
    target: "Fan_A",
    ability: "SpeedControl",
    state: "AVAILABLE"
}

以后 Decision 才能使用这个能力。


Experience Update

经验本身通常不应该被随意改写。

例如:

EXP_1001

记录的是过去真实发生过的一次经历。

如果后来发现该经验存在问题,更合理的处理是:

Experience
state = INVALID

或者:

Experience
state = CONFLICT

而不是直接删除历史。

因此:

Historical Experience
        ↓
Learning Evaluation
        ↓
Experience State Update

能够保留学习过程的可追踪性。


Learning 的完整运行模型

将本章全部内容连接起来:

             External Information
                    ↓
                Perception
                    ↓
                 Cognition
                    ↓
                  Memory
                    ↓
                Experience
                    ↑
                    │
Action → Result → Feedback
                    │
                    ↓
                 Learning
                    │
          ┌─────────┼─────────┐
          ↓         ↓         ↓
      Knowledge   Memory    Ability
          │         │         │
          └─────────┼─────────┘
                    ↓
                 Learning
                  Update
                    ↓
                 Reasoning
                    ↓
                 Decision
                    ↓
                 Behavior
                    ↓
                  Action

这里形成一个完整循环:

学习之前:
Information → Cognition → Action

学习之后:
Action → Feedback → Experience → Learning
                                  ↓
                           Knowledge Update
                                  ↓
                              New Reasoning
                                  ↓
                              New Decision

Learning 的核心边界

必须保持几个概念的清晰边界:

Memory
→ 保存

Experience
→ 经历

Learning
→ 获取、整理、验证、更新

Knowledge
→ 学习形成或更新后的知识资源

Ability
→ 知识和方法形成的可应用能力

因此:

Memory ≠ Learning
Experience ≠ Learning
Learning ≠ Knowledge
Knowledge ≠ Ability
Ability ≠ Action

它们形成的是连续关系:

Experience
    ↓
Learning
    ↓
Knowledge
    ↓
Ability
    ↓
Decision
    ↓
Action

本章核心模型

Feedback
    ↓
Experience
    ↓
Learning
    ↓
Knowledge
    ↓
Ability Resource
    ↓
Reasoning
    ↓
Decision
    ↓
Behavior
    ↓
Action
    ↓
Result
    ↓
Feedback

同时:

Memory
   ↕
Learning
   ↕
Knowledge

最终形成 SAI 的学习循环:

信息
 ↓
感知
 ↓
认知
 ↓
行为
 ↓
行动
 ↓
结果
 ↓
反馈
 ↓
经验
 ↓
学习
 ↓
知识更新
 ↓
能力资源更新
 ↓
记忆更新
 ↓
推理
 ↓
决策
 ↓
新的行为

本章核心定义

Learning 是 SAI 对信息、反馈、经验、知识和记忆进行比较、整理、验证与更新,从中获取新的知识资源、修正已有知识并更新相关记忆和能力资源的过程。

其中最核心的关系是:

Feedback → Experience → Learning → Knowledge → Ability
                         ↓
                      Memory Update

因此,第70章把第69章的 Experience 正式连接到了 SAI 的 Knowledge、Ability 和 Memory Update,形成:

经历 → 学习 → 知识 → 能力 → 再行动 → 再反馈

这就是 SAI 学习循环的基本结构。

Leave a Reply

Your email address will not be published. Required fields are marked *