第9章 对象—属性—方法映射
第8章重新定义了知识,并提出:
Knowledge=Structure+Relation+MappingKnowledge=Structure+Relation+Mapping
其中,**Mapping(映射)**是结构化知识由“描述”进入“可计算、可调用、可执行”的关键。
现实中的对象并不是孤立存在的。
一个对象具有属性,这些属性决定对象当前具有什么特征和条件;而这些特征和条件又决定哪些方法适用于该对象,以及方法执行后可能产生什么结果。
因此,本章建立结构化智能中的核心映射:
Object→Attribute→Method\boxed{ Object \rightarrow Attribute \rightarrow Method }
9.1 Object–Attribute–Method
在最基本的形式上:
Object→AttributeObject \rightarrow Attribute
表示:
对象具有什么属性。
例如:
Object = Glass01
Attributes:
Material = Glass
Fragility = High
Temperature = 80°C
Weight = 300g
进一步:
Attribute→MethodAttribute \rightarrow Method
表示:
某些属性和属性组合决定哪些方法具有适用性。
例如:
Fragility = High
+
Temperature = High
↓
HandleCarefully
于是形成:
Object
↓
Attributes
↓
Conditions
↓
Applicable Methods
因此:
O→A→C→M\boxed{ O \rightarrow A \rightarrow C \rightarrow M }
其中:
- OO:Object
- AA:Attribute
- CC:Condition
- MM:Method
这比简单的:
Object→MethodObject \rightarrow Method
更加准确。
因为方法通常不是直接由“对象名称”决定,而是由对象的属性、状态、关系和条件共同决定。
9.2 对象为什么需要属性才能关联方法
如果系统只知道:
Object = Box01
它无法可靠决定应该采用什么方法。
因为 Box01 可能具有不同属性:
Weight = 1kg
也可能:
Weight = 100kg
还可能:
Material = Glass
或者:
Material = Steel
虽然对象类别相同,但方法适用条件可能完全不同。
因此:
Method=F(Object,Attributes,State,Relation,Condition)Method=F(Object,Attributes,State,Relation,Condition)
这意味着:
属性不是对象的附属描述,而是对象进入方法空间的重要桥梁。
9.3 属性与方法的关联
属性与方法之间存在多种关系。
1. 属性决定方法是否适用
例如:
Weight < 5kg
↓
ManualMove
而:
Weight > 50kg
↓
MachineMove
因此:
A→MethodApplicableA \rightarrow Method_{Applicable}
2. 属性决定方法参数
例如:
Object:
Glass01
Weight = 300g
Fragility = High
方法:
Handle(Object, Force, Velocity)
则:
Weight
↓
Force
Fragility
↓
Velocity
形成:
A→ParameterA \rightarrow Parameter
3. 属性决定方法选择
多个方法可能都适用于同一个对象。
例如:
Box01
↓
Method A: ManualMove
Method B: RobotMove
Method C: ConveyorMove
系统需要根据:
Weight
Distance
AvailableCapability
Cost
Risk
Goal
进行选择。
因此:
MethodSelection=F(Attribute,State,Goal,Constraint)MethodSelection = F(Attribute,State,Goal,Constraint)
9.4 方法适用条件
方法不是无条件存在的。
每一个 Method 都应该具有自己的适用条件(Applicability Conditions)。
可以定义:
Applicable(M,S,C)={1,Conditions satisfied0,OtherwiseApplicable(M,S,C)= \begin{cases} 1,& Conditions\ satisfied\\ 0,& Otherwise \end{cases}
例如:
Method:
PrecisionGrasp
适用条件:
Object is Graspable
Weight < ForceLimit
Position is Known
Gripper is Available
Risk < Threshold
因此:
Applicable(PrecisionGrasp)=Graspable∧Weight<ForceLimit∧PositionKnown∧GripperAvailableApplicable(PrecisionGrasp) = Graspable \land Weight<ForceLimit \land PositionKnown \land GripperAvailable
只有条件成立:
Applicable=1Applicable=1
方法才进入候选方法集合。
9.5 方法适用条件来自哪里
方法条件并不是孤立定义的。
它通常来自:
Object
Attribute
State
Relation
Environment
Goal
Constraint
Capability
因此:
CM=F(O,A,S,R,E,G,C)C_M= F(O,A,S,R,E,G,C)
例如:
Object = Glass01
Attribute:
Fragility = High
State:
Temperature = 80°C
Relation:
On(Table01)
Goal:
Move Glass01
系统可以计算:
Fragile = True
Hot = True
MoveRequired = True
于是:
NormalMove
✕
CarefulMove
✓
这就是方法适用条件。
9.6 方法输入与输出
一个 Method 不仅需要适用条件,还必须定义输入和输出。
可以表示:
Method:Input→Process→OutputMethod: Input \rightarrow Process \rightarrow Output
例如:
Move(Object, Position, Speed)
输入:
Object
Position
Speed
执行后:
Output:
NewPosition
MovementResult
因此:
M=(I,C,P,O)M=(I,C,P,O)
其中:
- II:Input
- CC:Condition
- PP:Process
- OO:Output
9.7 输入不只是数据
这里需要进一步区分。
Method Input 并不只是普通 Data。
输入可以来自:
Object
Attribute
State
Relation
Goal
Constraint
Environment
例如:
PrecisionGrasp(
Object=Glass01,
Position=(120,80),
Force=1.2N,
Velocity=0.08m/s
)
其中:
Glass01
来自 Object。
Position
Force
Velocity
则来自对象属性、状态以及知识计算。
因此:
Knowledge→InputExtraction→ParameterAssignmentKnowledge \rightarrow InputExtraction \rightarrow ParameterAssignment
这已经开始接近下一阶段的 Capability。
9.8 方法输出
方法输出可能是:
1. 新状态
St→St+1S_t \rightarrow S_{t+1}
例如:
Door:
Closed → Open
2. 新关系
Robot
↓
Holding
↓
Box
3. 新对象
例如生产过程中产生新的产品对象。
4. 新数据
例如:
Measurement
Result
Record
5. 行为结果
Success
Failure
PartialSuccess
因此:
Output={State,Relation,Object,Data,Result}Output= \{State,Relation,Object,Data,Result\}
方法执行的最终意义,是使现实或系统状态发生可观察变化。
9.9 方法不是动作
这一点需要与前面的理论保持严格区分。
例如:
Method:
MoveObject
描述的是:
如何完成移动对象这一类任务。
而:
Action:
RobotArm
Position=(120,80)
Speed=0.2m/s
Force=5N
才是具体执行动作。
因此:
Method
↓
Parameterization
↓
Method Instance
↓
Behavior
↓
Action
所以:
Method≠ActionMethod \neq Action
Method 是可复用结构。
Action 是具体执行。
9.10 一对多映射
一个对象可以对应多个方法。
例如:
Object = Box01
↓
Method A = Move
Method B = Open
Method C = Inspect
Method D = Measure
因此:
O→{M1,M2,…,Mn}O \rightarrow \{M_1,M_2,\ldots,M_n\}
但并不是所有方法都同时适用。
当前 Scene 和 State 会进一步筛选:
CandidateMethods=Match(O,A,R,S,C)CandidateMethods = Match(O,A,R,S,C)
然后形成:
CandidateMethods→Evaluation→MethodSelectionCandidateMethods \rightarrow Evaluation \rightarrow MethodSelection
这就为第29章 方法选择埋下基础。
9.11 多对象方法映射
某些方法并不作用于单一对象。
例如:
Robot01
Box01
Table01
方法:
Place(
Robot,
Object,
Target
)
它同时需要:
Robot
+
Object
+
Target
因此:
M=f(O1,O2,…,On,A,R,S)M=f(O_1,O_2,…,O_n,A,R,S)
这说明方法映射不仅可以是:
Object→MethodObject \rightarrow Method
也可以是:
{Object1,Object2,…,Objectn}→Method\{Object_1,Object_2,…,Object_n\} \rightarrow Method
而对象之间的 Relation 往往成为方法适用的重要条件。
例如:
Robot
│
CanReach
↓
Box
才能使:
Grasp(Box)
成为候选方法。
9.12 结构化映射
由前面的分析可以看到,真正的知识结构并不是简单的:
Object → Method
而是一个多层映射:
Object
│
├── Attribute
│ │
│ └── Value
│
├── Relation
│
└── State
│
↓
Condition
│
↓
Method
│
┌───┴───┐
↓ ↓
Input Output
│ │
↓ ↓
Parameters State Change
因此,可以定义:
Mmapping:(O,A,R,S,C)→(M,I,Oout)\boxed{ M_{mapping}: (O,A,R,S,C) \rightarrow (M,I,O_{out}) }
其中:
- OO:对象
- AA:属性
- RR:关系
- SS:状态
- CC:条件
- MM:方法
- II:方法输入
- OoutO_{out}:方法输出
这就是本章所说的结构化映射。
9.13 映射不是固定关系
结构化映射还具有动态性。
同一个对象在不同状态下,可以对应不同方法。
例如:
Glass01
状态一:
Temperature = 25°C
Fragility = High
可能:
Method = NormalHandle
状态二:
Temperature = 90°C
Fragility = High
则:
Method = CarefulHandle
对象没有变化:
Ot=Ot+1O_t=O_{t+1}
但状态变化:
St≠St+1S_t\neq S_{t+1}
导致:
Mt≠Mt+1M_t\neq M_{t+1}
因此:
State Change→Mapping Change→Method Change\boxed{ State\ Change \rightarrow Mapping\ Change \rightarrow Method\ Change }
这是结构化智能能够产生动态行为的重要基础。
9.14 映射与认知
当 Scene 出现之后,系统可以进行:
Scene
↓
Object Identification
↓
Attribute / Relation / State
↓
Knowledge Mapping
↓
Candidate Methods
↓
Cognition
因此认知不再是一个完全独立的黑箱。
它可以被分解为:
Cognition=F(Scene,Knowledge,Mapping,Goal,Constraint)Cognition= F(Scene,Knowledge,Mapping,Goal,Constraint)
其中 Mapping 负责回答:
当前现实结构与哪些知识、能力和方法存在对应关系?
于是认知的重要组成部分变成:
结构匹配。
9.15 Object–Attribute–Method 的核心模型
综合本章,可以得到:
Object→Attribute→Condition→Method\boxed{ Object \rightarrow Attribute \rightarrow Condition \rightarrow Method }
进一步扩展:
Object+Attribute+Relation+State→Condition→Method→Input→Output\boxed{ Object+ Attribute+ Relation+ State \rightarrow Condition \rightarrow Method \rightarrow Input \rightarrow Output }
最终形成:
Object
│
┌─────────┼─────────┐
↓ ↓ ↓
Attribute Relation State
│ │ │
└─────────┼─────────┘
↓
Condition
↓
Method Matching
↓
Method
│
┌─────┴─────┐
↓ ↓
Input Output
↓ ↓
Parameterized State Change
Method │
│ ↓
└──────→ Reality
这条链已经开始把:
知识结构 → 方法结构 → 行为执行
连接起来。
9.16 本章核心结论
本章建立五个基本命题:
第一,Object–Attribute–Method 是结构化知识中的核心映射关系,但实际映射需要经过 State、Relation 和 Condition。
第二,属性决定对象具有什么特征,并参与决定哪些方法适用于对象。
第三,Method 必须具有明确的适用条件,而方法适用性是可以计算的。
第四,Method 具有输入与输出,输入可以由对象、属性、关系和状态中提取并参数化,输出则表现为状态、关系、对象或结果的变化。
第五,结构化映射不是固定的一对一关系,而是可以随着对象状态、场景、目标和约束变化而动态变化。
最终可以把本章压缩为一个核心公式:
(O,A,R,S,C)→M(I,Oout)\boxed{ (O,A,R,S,C) \rightarrow M(I,O_{out}) }
以及整个结构化知识到方法的基本链:
Object→Attribute→State→Condition→Method→Input→Output\boxed{ Object \rightarrow Attribute \rightarrow State \rightarrow Condition \rightarrow Method \rightarrow Input \rightarrow Output }
至此,第8章提出的 Knowledge = Structure + Relation + Mapping 得到了进一步展开。
而下一步最自然的问题就是:
这些 Object、Attribute、Relation、State、Condition、Method 组合起来以后,究竟形成什么样的完整知识结构?
这将进入 第10章 知识结构,从单一的“对象—属性—方法映射”,进一步上升到整个 Structured Knowledge Model。