MCPcopy Create free account
hub / github.com/SoarGroup/Soar / create_soar_agent

Function create_soar_agent

Core/SoarKernel/src/agent.cpp:152–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152agent* create_soar_agent(char* agent_name) /* loop index */
153{
154 char cur_path[MAXPATHLEN]; /* AGR 536 */
155
156 //agent* newAgent = static_cast<agent *>(malloc(sizeof(agent)));
157 agent* newAgent = new agent();
158
159 // debug module settings
160 newAgent->debug_params = new debug_param_container(newAgent);
161 newAgent->output_settings = new AgentOutput_Info();
162
163 newAgent->current_tc_number = 0;
164
165 newAgent->name = savestring(agent_name);
166
167 /* mvp 5-17-94 */
168 newAgent->variables_set = NIL;
169
170//#ifdef _WINDOWS
171// newAgent->current_line[0] = 0;
172// newAgent->current_line_index = 0;
173//#endif /* _WINDOWS */
174
175 newAgent->all_wmes_in_rete = NIL;
176 newAgent->alpha_mem_id_counter = 0;
177 newAgent->alternate_input_string = NIL;
178 newAgent->alternate_input_suffix = NIL;
179 newAgent->alternate_input_exit = false;/* Soar-Bugs #54 */
180 newAgent->backtrace_number = 0;
181 newAgent->beta_node_id_counter = 0;
182 newAgent->bottom_goal = NIL;
183 newAgent->changed_slots = NIL;
184 newAgent->chunk_count = 1;
185 newAgent->chunk_free_problem_spaces = NIL;
186 newAgent->chunky_problem_spaces = NIL; /* AGR MVL1 */
187 strcpy(newAgent->chunk_name_prefix, "chunk"); /* ajc (5/14/02) */
188 newAgent->context_slots_with_changed_acceptable_preferences = NIL;
189 newAgent->current_file = NIL;
190 newAgent->current_phase = INPUT_PHASE;
191 newAgent->applyPhase = false;
192 newAgent->current_symbol_hash_id = 0;
193 newAgent->current_variable_gensym_number = 0;
194 newAgent->current_wme_timetag = 1;
195 newAgent->default_wme_depth = 1; /* AGR 646 */
196 newAgent->disconnected_ids = NIL;
197 newAgent->existing_output_links = NIL;
198 newAgent->output_link_changed = false; /* KJC 11/9/98 */
199 /* newAgent->explain_flag = false; */
200 newAgent->go_number = 1;
201 newAgent->go_type = GO_DECISION;
202 newAgent->init_count = 0;
203 newAgent->rl_init_count = 0;
204 newAgent->grounds_tc = 0;
205 newAgent->highest_goal_whose_context_changed = NIL;
206 newAgent->ids_with_unknown_level = NIL;
207 newAgent->input_period = 0; /* AGR REW1 */
208 newAgent->input_cycle_flag = true; /* AGR REW1 */
209 newAgent->justification_count = 1;

Callers 1

HandleCreateAgentMethod · 0.85

Calls 13

savestringFunction · 0.85
reset_max_statsFunction · 0.85
printFunction · 0.85
xml_createFunction · 0.85
soar_init_callbacksFunction · 0.85
init_memory_utilitiesFunction · 0.85
init_sysparamsFunction · 0.85
reset_timersFunction · 0.85
select_initFunction · 0.85
predict_initFunction · 0.85

Tested by

no test coverage detected