public String execute(Percept percept) {
//增加一个感知到感知序列中
percepts.append(percept);
//从感知序列和做出的行动的表中查找应做出的行动
return lookupCurrentAction();
}
private String lookupCurrentAction() {
String action;
action = table.get(percepts, ACTION);
if (null == action) {
action = NO_OP;//感知序列中找不到就停下来
}
return action;
}