-
Notifications
You must be signed in to change notification settings - Fork 11
API End Points
Erik Harpstead edited this page Jun 12, 2019
·
9 revisions
The Apprentice Learner Architecture is implemented in the form of a RESTful API. Here we document the expected request and response structures for each of the API endpoints.
Description: Used to instantiate new agents remotely.
Target: localhost:8000/create/
Methods: POST
Required Fields
-
agent_type- Defines the type of agent you want to create and changes the interpretation of some of the other fields, see below. Must be one of the following:ModularAgent,WhereWhenHowNoFoa,RLAgent,Memo,Stub. -
args- Used to provide additional parameters to the creation of the Agent based onagent_type,
Optional Fields
-
project_id- Associates the agent to a particular project. Projects are mainly used for organization and to provide a agents with a common set of initial operators for relational inference and how search. Agents are automatically assigned to the default project (1) if left unspecified. Must be an integer > 0. -
feature_set- A list specifying an additional set of initial operators this agent can use to perform relational inference. Must be a list of int ids or string names. -
function_set- A list specifying an additional set of initial operators this agent can use to perform how search. Must be a list of int ids or string names. -
stay_active- A boolean flag for whether to maintain the agent in RAM as the active agent or allowing it to be saved in and out of RAM. Default is false. -
dont_save- A boolean flag for whether to prevent saving the agent into the database during future calls. Default is false.
The ModularAgent type is the agent type you will use in most cases. It represents the current best implementation of the Apprentice Learner API as a modular architecture that can represent a number of different learners. The ModularAgent's args object contains the following optional fields:
- when_learner='decisiontree'
- where_learner='MostSpecific'
- heuristic_learner='proportion_correct'
- how_cull_rule='all',
- planner='fo_planner',
- search_depth=1,
- numerical_epsilon=0.0
{
"agent_type":"ModularAgent",
"project_id":1,
"feature_set":[...],
"function_set":[...],
"args":{}
}