📄 abstractagent.java
字号:
/**
* Description: The description of social cognitive agent.
*
* @Information source: a) external library (L); b) the own memory: a point that
* generated in the last learning cycle
*
* @Coefficients: TaoB and TaoW
*
* @ Author Create/Modi Note
* Xiaofeng Xie Mar 11, 2003
* Xiaofeng Xie May 11, 2004
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* Please acknowledge the author(s) if you use this code in any way.
*
* @version 1.0
* @Since MAOS1.0
*
* @References:
* [1] Xie X F, Zhang W J. Solving engineering design problems by social cognitive
* optimization. Genetic and Evolutionary Computation Conference, 2004
*/
package agent;
import knowledge.*;
import goodness.*;
import problem.*;
import space.*;
abstract public class AbstractAgent {
//Describes the problem to be solved
protected ProblemEncoder problemEncoder;
//Forms the goodness landscape
protected IGoodnessCompareEngine specComparator;
//store the point that generated in current learning cycle
protected SearchPoint trailPoint;
public void setProblemEncoder(ProblemEncoder encoder) {
problemEncoder = encoder;
trailPoint = problemEncoder.getEncodedSearchPoint();
}
public void setSpecComparator(IGoodnessCompareEngine comparer) {
specComparator = comparer;
}
public SearchPoint generatePoint(int t) {
generatePoint(trailPoint, t);
//evalute into goodness information
problemEncoder.evaluate(trailPoint);
return trailPoint;
}
abstract protected void generatePoint(ILocationEngine tempPoint, int t);
abstract public void updateInfo();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -