![JAR search and dependency download from the Maven repository](/logo.png)
templates.environment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jason Show documentation
Show all versions of jason Show documentation
Jason is a fully-fledged interpreter for an extended version of AgentSpeak, a BDI agent-oriented logic programming language.
The newest version!
// Environment code for project
import jason.asSyntax.*;
import jason.environment.*;
import java.util.logging.*;
public class extends Environment {
private Logger logger = Logger.getLogger("."+.class.getName());
/** Called before the MAS execution with the args informed in .mas2j */
@Override
public void init(String[] args) {
super.init(args);
addPercept(ASSyntax.parseLiteral("percept(demo)"));
}
@Override
public boolean executeAction(String agName, Structure action) {
logger.info("executing: "+action+", but not implemented!");
if (true) { // you may improve this condition
informAgsEnvironmentChanged();
}
return true; // the action was executed with success
}
/** Called before the end of MAS execution */
@Override
public void stop() {
super.stop();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy