📄 company.java
字号:
package game;
public class Company {
//公司的id号
int id;
//公司所在游戏环境中的位置
int x,y;
//现行的策略
int action;
//博弈后学习的策略
//int best_action;
//本次博弈收益
double profile;
//博弈总收益
double all_profile;
//移动方向
int direction;
//移动后在游戏环境中的位置
int nextX,nextY;
//合作者与竞争者相遇,竞争者的收益
double m;
//博弈规则
public double rule(int action_B){
if(action==1&&action_B==1){
return 1.0;
}
if(action==2&&action_B==1){
return m;
}
return 0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -