📄 controller.asl
字号:
/* Initial goals */
!start(0).
!loopActions.
!end(30 * 1000). // (Optional) Terminate MAS in 30 seconds after running
+!start(X) : X <= 25 /2 // EDIT THIS LINE TO DETERMINE THE NUMBER OF AGENTS
<- .print("Creating Agents");
.create_agent(player(X), "src/asl/player.asl"); // E.G. Copy/Mod this line if you want to unbalance the "fight"
.create_agent(enemy(X), "src/asl/enemy.asl");
!!start(X+1).
+deadAgent(player(X))[source(percept)] // REMOVE these next two functions if you want to keep the agents for debugging, or if you don't fancy the speedup
<- .print("Killing Agent");
.kill_agent(player(X)).
+deadAgent(enemy(X))[source(percept)]
<- .print("Killing Agent");
.kill_agent(enemy(X)).
+!loopActions
<- checkHealth;
!!loopActions.
+!end(T) : T <= 0 <- .stopMAS.
+!end(T) : true
<- .print("Terminating MAS in ",T/1000," seconds!");
.wait(2000); !end(T-2000).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -