Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

aiscore.cc File Reference

Scorekeeper and Victory Condition Analysis for AIs. More...

#include "conq.h"
#include "kernel.h"
#include "aiscore.h"

Include dependency graph for aiscore.cc:

Include dependency graph

Functions

AI_SKAnalysisanalyze_sk_sum_uprop_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper 'sum-uprop' form.

AI_SKAnalysisanalyze_sk_turn_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper 'turn' keyword.

AI_SKAnalysisanalyze_sk_score_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper 'score' keyword/form.

AI_SKAnalysisanalyze_sk_arith_op_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper arithmetic operation form.

AI_SKAnalysisanalyze_sk_arith_gt_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper arithmetic '>' form.

AI_SKAnalysisanalyze_sk_arith_ge_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper arithmetic '>=' form.

AI_SKAnalysisanalyze_sk_arith_lt_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper arithmetic '<' form.

AI_SKAnalysisanalyze_sk_arith_le_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper arithmetic '<=' form.

AI_SKAnalysisanalyze_sk_arith_ne_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper arithmetic '/=' form.

AI_SKAnalysisanalyze_sk_arith_eq_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper arithmetic '=' form.

AI_SKAnalysisanalyze_sk_arith_comp_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper arithmetic comparison form.

AI_SKAnalysisanalyze_sk_bool_or_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper boolean 'or' form.

AI_SKAnalysisanalyze_sk_bool_and_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper boolean 'and' form.

AI_SKAnalysisanalyze_sk_bool_comp_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper boolean comparison form.

AI_SKAnalysisanalyze_sk_when_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper 'when' form.

AI_SKAnalysisanalyze_sk_always_true_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper test form that is always true.

AI_SKAnalysisanalyze_sk_test (Side *side, Scorekeeper *sk, Obj *sktest, AI_SKAnalysis *parent)
 Analyze a scorekeeper test form.

AI_SKAnalysisanalyze_sk_if_action (Side *side, Scorekeeper *sk, Obj *skact, AI_SKAnalysis *parent)
 Analyze a scorekeeper 'if' form.

AI_SKAnalysisanalyze_sk_action (Side *side, Scorekeeper *sk, Obj *skact, AI_SKAnalysis *parent)
 Analyze a scorekeeper action form.

AI_SKAnalysisanalyze_scorekeeper (Side *side, Scorekeeper *sk)
 Analyze a scorekeeper.

AI_SKAnalysisanalyze_scorekeepers (Side *side)
 Analyze all the scorekeepers.


Detailed Description

Scorekeeper and Victory Condition Analysis for AIs.

Part of the AI API, Level 1.

Provides useful functions that an AI implementation may use to analyze scorekeepers.

Note:
Nothing in this file should ever be required to implement an AI; everything here is optional.
The way scorekeepers are analyzed by the code in this file is not too tricky. We simply assume the consequent (action/outcome), and then work with the antecedents (tests) to find out what conditions would cause the consequent to be true (i.e., the action to be performed). The simplest antecedent is the value of truth, and this is the default value unless an antecedent (test) is specified to be in correspondance with the assumed consequent (action/outcome). For the purposes of our analysis, 'when' and 'trigger' conditions may be regarded as antecedents that are universal to the entire scorekeeper body, and therefore are in correspondance with every consequent in the body.

Function Documentation

AI_SKAnalysis* analyze_scorekeeper Side side,
Scorekeeper sk
 

Analyze a scorekeeper.

Returns:
List of 1 or more scorekeeper analyses, if successful.
Todo:
Do compaction on resulting analyses.

AI_SKAnalysis* analyze_scorekeepers Side side  ) 
 

Analyze all the scorekeepers.

Todo:
Perform compaction and summarization of analyses.

AI_SKAnalysis* analyze_sk_action Side side,
Scorekeeper sk,
Obj skact,
AI_SKAnalysis parent
 

Analyze a scorekeeper action form.

Todo:
Analyze 'cond' forms.

Support 'trigger' tests.

AI_SKAnalysis* analyze_sk_always_true_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper test form that is always true.

AI_SKAnalysis* analyze_sk_arith_comp_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper arithmetic comparison form.

AI_SKAnalysis* analyze_sk_arith_eq_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper arithmetic '=' form.

AI_SKAnalysis* analyze_sk_arith_ge_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper arithmetic '>=' form.

AI_SKAnalysis* analyze_sk_arith_gt_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper arithmetic '>' form.

AI_SKAnalysis* analyze_sk_arith_le_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper arithmetic '<=' form.

AI_SKAnalysis* analyze_sk_arith_lt_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper arithmetic '<' form.

AI_SKAnalysis* analyze_sk_arith_ne_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper arithmetic '/=' form.

AI_SKAnalysis* analyze_sk_arith_op_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper arithmetic operation form.

Note:
Mostly just let things fall through here for now.

AI_SKAnalysis* analyze_sk_bool_and_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper boolean 'and' form.

AI_SKAnalysis* analyze_sk_bool_comp_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper boolean comparison form.

AI_SKAnalysis* analyze_sk_bool_or_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper boolean 'or' form.

AI_SKAnalysis* analyze_sk_if_action Side side,
Scorekeeper sk,
Obj skact,
AI_SKAnalysis parent
 

Analyze a scorekeeper 'if' form.

AI_SKAnalysis* analyze_sk_score_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper 'score' keyword/form.

AI_SKAnalysis* analyze_sk_sum_uprop_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper 'sum-uprop' form.

Todo:
Handle GDL memory leak involving uprop name.

AI_SKAnalysis* analyze_sk_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper test form.

Todo:
Handle 'append', 'remove', and 'remove-list'.

AI_SKAnalysis* analyze_sk_turn_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper 'turn' keyword.

AI_SKAnalysis* analyze_sk_when_test Side side,
Scorekeeper sk,
Obj sktest,
AI_SKAnalysis parent
 

Analyze a scorekeeper 'when' form.

Todo:
Implement.


Generated on Sat Sep 17 10:28:57 2005 for XconqKernel by doxygen 1.3.6