Soar Kernel  9.3.2 08-06-12
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Macros | Typedefs | Functions
gsysparam.h File Reference

Go to the source code of this file.

Macros

#define ATTENTION_LAPSE_ON_SYSPARAM   31
#define CHUNK_PRODUCTION_TYPE   2
#define CHUNK_THROUGH_LOCAL_NEGATIONS_SYSPARAM   39
#define DECISION_CYCLE_MAX_USEC_INTERRUPT   45
#define DEFAULT_PRODUCTION_TYPE   1
#define EXPLAIN_SYSPARAM   27
#define FULL_WME_TRACE   3 /* print whole wme */
#define HIGHEST_SYSPARAM_NUMBER   45
#define JUSTIFICATION_PRODUCTION_TYPE   3
#define kChunkNamePrefixMaxLength   64 /* kjh (B14) */
#define LEARNING_ALL_GOALS_SYSPARAM   23
#define LEARNING_EXCEPT_SYSPARAM   22
#define LEARNING_ON_SYSPARAM   20
#define LEARNING_ONLY_SYSPARAM   21
#define MAX_CHUNKS_SYSPARAM   18
#define MAX_ELABORATIONS_SYSPARAM   17
#define MAX_GOAL_DEPTH   35
#define MAX_MEMORY_USAGE_SYSPARAM   36
#define MAX_NIL_OUTPUT_CYCLES_SYSPARAM   32
#define MS_ASSERT   1 /* print just assertions */
#define MS_ASSERT_RETRACT   0 /* print both retractions and assertions */
#define MS_RETRACT   2 /* print just retractions */
#define NO_WME_TRACE_SET   4
#define NONE_WME_TRACE   1 /* don't print anything */
#define NUM_PRODUCTION_TYPES   5
#define PRINT_ALIAS_SYSPARAM   26
#define PRINT_WARNINGS_SYSPARAM   25
#define REAL_TIME_SYSPARAM   30
#define RESPOND_TO_LOAD_ERRORS_SYSPARAM   19
#define TEMPLATE_PRODUCTION_TYPE   4
#define TIMERS_ENABLED   34
#define TIMETAG_WME_TRACE   2 /* print just timetag */
#define TRACE_BACKTRACING_SYSPARAM   15
#define TRACE_CHUNK_NAMES_SYSPARAM   11
#define TRACE_CHUNKS_SYSPARAM   13
#define TRACE_CONTEXT_DECISIONS_SYSPARAM   1
#define TRACE_EPMEM_SYSPARAM   42
#define TRACE_FIRINGS_OF_CHUNKS_SYSPARAM   5
#define TRACE_FIRINGS_OF_DEFAULT_PRODS_SYSPARAM   4
#define TRACE_FIRINGS_OF_JUSTIFICATIONS_SYSPARAM   6
#define TRACE_FIRINGS_OF_TEMPLATES_SYSPARAM   7
#define TRACE_FIRINGS_OF_USER_PRODS_SYSPARAM   3
#define TRACE_FIRINGS_PREFERENCES_SYSPARAM   9
#define TRACE_FIRINGS_WME_TRACE_TYPE_SYSPARAM   8
#define TRACE_GDS_SYSPARAM   44
#define TRACE_INDIFFERENT_SYSPARAM   33
#define TRACE_JUSTIFICATION_NAMES_SYSPARAM   12
#define TRACE_JUSTIFICATIONS_SYSPARAM   14
#define TRACE_LOADING_SYSPARAM   16
#define TRACE_OPERAND2_REMOVALS_SYSPARAM   29
#define TRACE_PHASES_SYSPARAM   2
#define TRACE_RL_SYSPARAM   38
#define TRACE_SMEM_SYSPARAM   43
#define TRACE_WATERFALL_SYSPARAM   40
#define TRACE_WM_CHANGES_SYSPARAM   10
#define TRACE_WMA_SYSPARAM   41
#define USE_LONG_CHUNK_NAMES   28
#define USER_PRODUCTION_TYPE   0
#define USER_SELECT_BOLTZMANN   1 /* boltzmann algorithm, with respect to temperature */
#define USER_SELECT_E_GREEDY   2 /* with probability epsilon choose random, otherwise greedy */
#define USER_SELECT_FIRST   3 /* just choose the first candidate item */
#define USER_SELECT_INVALID   7 /* should be 1+ last item, used for validity checking */
#define USER_SELECT_LAST   4 /* choose the last item AGR 615 */
#define USER_SELECT_MODE_SYSPARAM   24
#define USER_SELECT_RANDOM   5 /* pick one at random */
#define USER_SELECT_REDUCE_SYSPARAM   37
#define USER_SELECT_SOFTMAX   6 /* pick one at random, probabalistically biased by numeric preferences */

Typedefs

typedef struct agent_struct agent
typedef char Bool
typedef unsigned char byte
typedef byte ms_trace_type
typedef byte wme_trace_type

Functions

void init_sysparams (agent *thisAgent)
void set_sysparam (agent *thisAgent, int param_number, int64_t new_value)

Macro Definition Documentation

#define ATTENTION_LAPSE_ON_SYSPARAM   31

Definition at line 152 of file gsysparam.h.

Referenced by init_sysparams().

#define CHUNK_PRODUCTION_TYPE   2
#define CHUNK_THROUGH_LOCAL_NEGATIONS_SYSPARAM   39

Definition at line 174 of file gsysparam.h.

Referenced by build_chunk_conds_for_grounds_and_add_negateds(), and init_sysparams().

#define DECISION_CYCLE_MAX_USEC_INTERRUPT   45

Definition at line 192 of file gsysparam.h.

Referenced by do_one_top_level_phase(), and init_sysparams().

#define DEFAULT_PRODUCTION_TYPE   1

Definition at line 44 of file gsysparam.h.

Referenced by parse_production(), and print_production().

#define EXPLAIN_SYSPARAM   27
#define FULL_WME_TRACE   3 /* print whole wme */
#define HIGHEST_SYSPARAM_NUMBER   45

Definition at line 195 of file gsysparam.h.

Referenced by init_sysparams(), and set_sysparam().

#define JUSTIFICATION_PRODUCTION_TYPE   3
#define kChunkNamePrefixMaxLength   64 /* kjh (B14) */

Definition at line 205 of file gsysparam.h.

#define LEARNING_ALL_GOALS_SYSPARAM   23

Definition at line 126 of file gsysparam.h.

Referenced by init_sysparams(), and should_variablize().

#define LEARNING_EXCEPT_SYSPARAM   22

Definition at line 125 of file gsysparam.h.

Referenced by init_sysparams(), and should_variablize().

#define LEARNING_ON_SYSPARAM   20

Definition at line 123 of file gsysparam.h.

Referenced by init_sysparams(), and should_variablize().

#define LEARNING_ONLY_SYSPARAM   21

Definition at line 124 of file gsysparam.h.

Referenced by init_sysparams(), and should_variablize().

#define MAX_CHUNKS_SYSPARAM   18

Definition at line 118 of file gsysparam.h.

Referenced by chunk_instantiation(), and init_sysparams().

#define MAX_ELABORATIONS_SYSPARAM   17
#define MAX_GOAL_DEPTH   35

Definition at line 162 of file gsysparam.h.

Referenced by create_new_context(), and init_sysparams().

#define MAX_MEMORY_USAGE_SYSPARAM   36

Definition at line 165 of file gsysparam.h.

Referenced by init_sysparams().

#define MAX_NIL_OUTPUT_CYCLES_SYSPARAM   32
#define MS_ASSERT   1 /* print just assertions */

Definition at line 57 of file gsysparam.h.

Referenced by print_match_set(), and xml_match_set().

#define MS_ASSERT_RETRACT   0 /* print both retractions and assertions */

Definition at line 56 of file gsysparam.h.

Referenced by print_match_set(), and xml_match_set().

#define MS_RETRACT   2 /* print just retractions */

Definition at line 58 of file gsysparam.h.

Referenced by print_match_set(), and xml_match_set().

#define NO_WME_TRACE_SET   4

Definition at line 70 of file gsysparam.h.

#define NONE_WME_TRACE   1 /* don't print anything */
#define NUM_PRODUCTION_TYPES   5

Definition at line 49 of file gsysparam.h.

#define PRINT_ALIAS_SYSPARAM   26

Definition at line 136 of file gsysparam.h.

Referenced by init_sysparams().

#define PRINT_WARNINGS_SYSPARAM   25
#define REAL_TIME_SYSPARAM   30

Definition at line 149 of file gsysparam.h.

#define RESPOND_TO_LOAD_ERRORS_SYSPARAM   19

Definition at line 120 of file gsysparam.h.

Referenced by init_sysparams().

#define TEMPLATE_PRODUCTION_TYPE   4
#define TIMERS_ENABLED   34
#define TIMETAG_WME_TRACE   2 /* print just timetag */
#define TRACE_BACKTRACING_SYSPARAM   15
#define TRACE_CHUNK_NAMES_SYSPARAM   11

Definition at line 106 of file gsysparam.h.

Referenced by chunk_instantiation(), init_sysparams(), and report_local_negation().

#define TRACE_CHUNKS_SYSPARAM   13

Definition at line 108 of file gsysparam.h.

Referenced by chunk_instantiation(), and should_variablize().

#define TRACE_CONTEXT_DECISIONS_SYSPARAM   1
#define TRACE_EPMEM_SYSPARAM   42

Definition at line 183 of file gsysparam.h.

Referenced by epmem_new_episode(), and epmem_process_query().

#define TRACE_FIRINGS_OF_CHUNKS_SYSPARAM   5

Definition at line 99 of file gsysparam.h.

Referenced by init_sysparams().

#define TRACE_FIRINGS_OF_DEFAULT_PRODS_SYSPARAM   4

Definition at line 98 of file gsysparam.h.

Referenced by reinitialize_soar().

#define TRACE_FIRINGS_OF_JUSTIFICATIONS_SYSPARAM   6

Definition at line 100 of file gsysparam.h.

#define TRACE_FIRINGS_OF_TEMPLATES_SYSPARAM   7

Definition at line 101 of file gsysparam.h.

#define TRACE_FIRINGS_OF_USER_PRODS_SYSPARAM   3

Definition at line 97 of file gsysparam.h.

Referenced by reinitialize_soar(), and trace_firings_of_inst().

#define TRACE_FIRINGS_PREFERENCES_SYSPARAM   9

Definition at line 104 of file gsysparam.h.

Referenced by create_instantiation(), reinitialize_soar(), and retract_instantiation().

#define TRACE_FIRINGS_WME_TRACE_TYPE_SYSPARAM   8
#define TRACE_GDS_SYSPARAM   44

Definition at line 189 of file gsysparam.h.

Referenced by add_wme_to_gds(), gds_invalid_so_remove_goal(), and reinitialize_soar().

#define TRACE_INDIFFERENT_SYSPARAM   33

Definition at line 157 of file gsysparam.h.

Referenced by exploration_boltzmann_select(), and exploration_epsilon_greedy_select().

#define TRACE_JUSTIFICATION_NAMES_SYSPARAM   12

Definition at line 107 of file gsysparam.h.

Referenced by chunk_instantiation(), and init_sysparams().

#define TRACE_JUSTIFICATIONS_SYSPARAM   14

Definition at line 109 of file gsysparam.h.

Referenced by chunk_instantiation().

#define TRACE_LOADING_SYSPARAM   16
#define TRACE_OPERAND2_REMOVALS_SYSPARAM   29
#define TRACE_PHASES_SYSPARAM   2
#define TRACE_RL_SYSPARAM   38

Definition at line 171 of file gsysparam.h.

Referenced by rl_perform_update(), and rl_store_data().

#define TRACE_SMEM_SYSPARAM   43

Definition at line 186 of file gsysparam.h.

Referenced by smem_store_chunk().

#define TRACE_WATERFALL_SYSPARAM   40

Definition at line 177 of file gsysparam.h.

Referenced by do_preference_phase(), and shouldCreateInstantiation().

#define TRACE_WM_CHANGES_SYSPARAM   10
#define TRACE_WMA_SYSPARAM   41
#define USE_LONG_CHUNK_NAMES   28

Definition at line 143 of file gsysparam.h.

Referenced by generate_chunk_name_sym_constant(), and init_sysparams().

#define USER_PRODUCTION_TYPE   0

Definition at line 43 of file gsysparam.h.

Referenced by parse_production(), print_production(), and rl_build_template_instantiation().

#define USER_SELECT_BOLTZMANN   1 /* boltzmann algorithm, with respect to temperature */
#define USER_SELECT_E_GREEDY   2 /* with probability epsilon choose random, otherwise greedy */
#define USER_SELECT_FIRST   3 /* just choose the first candidate item */
#define USER_SELECT_INVALID   7 /* should be 1+ last item, used for validity checking */

Definition at line 84 of file gsysparam.h.

Referenced by exploration_valid_policy().

#define USER_SELECT_LAST   4 /* choose the last item AGR 615 */
#define USER_SELECT_MODE_SYSPARAM   24

Definition at line 129 of file gsysparam.h.

Referenced by exploration_get_policy(), exploration_set_policy(), and init_sysparams().

#define USER_SELECT_RANDOM   5 /* pick one at random */
#define USER_SELECT_REDUCE_SYSPARAM   37
#define USER_SELECT_SOFTMAX   6 /* pick one at random, probabalistically biased by numeric preferences */

Typedef Documentation

typedef struct agent_struct agent

Definition at line 37 of file gsysparam.h.

typedef char Bool

Definition at line 35 of file gsysparam.h.

typedef unsigned char byte

Definition at line 36 of file gsysparam.h.

Definition at line 60 of file gsysparam.h.

Definition at line 72 of file gsysparam.h.

Function Documentation

void init_sysparams ( agent thisAgent)

Definition at line 186 of file init_soar.cpp.

References ATTENTION_LAPSE_ON_SYSPARAM, CHUNK_THROUGH_LOCAL_NEGATIONS_SYSPARAM, DECISION_CYCLE_MAX_USEC_INTERRUPT, EXPLAIN_SYSPARAM, FALSE, HIGHEST_SYSPARAM_NUMBER, LEARNING_ALL_GOALS_SYSPARAM, LEARNING_EXCEPT_SYSPARAM, LEARNING_ON_SYSPARAM, LEARNING_ONLY_SYSPARAM, MAX_CHUNKS_SYSPARAM, MAX_ELABORATIONS_SYSPARAM, MAX_GOAL_DEPTH, MAX_MEMORY_USAGE_SYSPARAM, MAX_NIL_OUTPUT_CYCLES_SYSPARAM, NONE_WME_TRACE, PRINT_ALIAS_SYSPARAM, PRINT_WARNINGS_SYSPARAM, RESPOND_TO_LOAD_ERRORS_SYSPARAM, agent_struct::sysparams, TIMERS_ENABLED, TRACE_CHUNK_NAMES_SYSPARAM, TRACE_CONTEXT_DECISIONS_SYSPARAM, TRACE_FIRINGS_OF_CHUNKS_SYSPARAM, TRACE_FIRINGS_WME_TRACE_TYPE_SYSPARAM, TRACE_JUSTIFICATION_NAMES_SYSPARAM, TRACE_LOADING_SYSPARAM, TRACE_OPERAND2_REMOVALS_SYSPARAM, TRUE, USE_LONG_CHUNK_NAMES, USER_SELECT_MODE_SYSPARAM, USER_SELECT_REDUCE_SYSPARAM, and USER_SELECT_SOFTMAX.

Referenced by create_soar_agent().

{
int i;
for (i=0; i<HIGHEST_SYSPARAM_NUMBER+1; i++) thisAgent->sysparams[i] = 0;
/* --- set all params to zero, except the following: --- */
thisAgent->sysparams[TRACE_FIRINGS_WME_TRACE_TYPE_SYSPARAM] = NONE_WME_TRACE; /* RPM 6/05 Changed from timetag to none */
thisAgent->sysparams[TRACE_LOADING_SYSPARAM] = TRUE; /* KJC 8/96 */
thisAgent->sysparams[MAX_CHUNKS_SYSPARAM] = 50;
thisAgent->sysparams[MAX_GOAL_DEPTH] = 100; /* generate an interrupt so users can recover before exceed program stack*/
thisAgent->sysparams[MAX_MEMORY_USAGE_SYSPARAM] = 100000000; /* default to 100MB. Event generated when exceeded*/
//#ifdef USE_X_DISPLAY
// thisAgent->sysparams[RESPOND_TO_LOAD_ERRORS_SYSPARAM] = FALSE;
//#else
//#endif
#ifdef ATTENTION_LAPSE
/* RMJ */
#endif /* ATTENTION_LAPSE */
// voigtjr: turning learning off by default
thisAgent->sysparams[LEARNING_ONLY_SYSPARAM] = FALSE; /* AGR MVL1 */
thisAgent->sysparams[LEARNING_EXCEPT_SYSPARAM] = FALSE; /* KJC 8/96 */
thisAgent->sysparams[PRINT_ALIAS_SYSPARAM] = TRUE; /* AGR 627 */
thisAgent->sysparams[EXPLAIN_SYSPARAM] = FALSE; /* KJC 7/96 */
thisAgent->sysparams[USE_LONG_CHUNK_NAMES] = TRUE; /* kjh(B14) */
thisAgent->sysparams[TIMERS_ENABLED] = TRUE;
// JRV: Chunk through local negations by default
}
void set_sysparam ( agent thisAgent,
int  param_number,
int64_t  new_value 
)
  • Windows 3.1 can't do ^C handling */*

Definition at line 174 of file init_soar.cpp.

Referenced by exploration_set_policy(), init_explain(), and reinitialize_soar().

{
if ((param_number < 0) || (param_number > HIGHEST_SYSPARAM_NUMBER)) {
print (thisAgent, "Internal error: tried to set bad sysparam #: %d\n", param_number);
return;
}
thisAgent->sysparams[param_number] = new_value;
reinterpret_cast<soar_call_data>(param_number));
}