Package jason.stdlib

Class save_agent

All Implemented Interfaces:
InternalAction, Serializable

@Manual(literal=".save_agent(file[,initial_goals])", hint="stores the beliefs, rules, and plans of the agent into a file", argsHint={"the name of the file","the list of initial goals that will be included in the file [optional]"}, argsType={"string","list"}, examples={".save_agent(\"/tmp/x.asl\"): save the agent at file \"/tmp/x.asl\"",".save_agent(\"/tmp/x.asl\", [start, say(hello)]): includes start and say(hello) as initial goals"}, seeAlso={"jason.stdlib.create_agent","jason.stdlib.kill_agent","jason.stdlib.stopMAS","jason.runtime.RuntimeServices"}) public class save_agent extends DefaultInternalAction

Internal action: .save_agent.

Description: stores the beliefs, rules, and plans of the agent into a file.

Parameters:

  • + file name (atom, string, or variable): the name of the file.
  • + initial goals (list -- optional): list of initial goals that will be included in the file.

Examples:

  • .save_agent("/tmp/x.asl"): save the agent at file "/tmp/x.asl".
  • .save_agent("/tmp/x.asl", [start, say(hello)]): includes start and say(hello) as initial goals.
See Also: