Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cognition:aiexec [2023/02/02 03:20] – optrix | cognition:aiexec [2025/12/18 22:50] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====AIExec==== | ||
| + | |||
| + | AIExec (AI Execute) is the most common tool used when manually creating or running Cognition-based AIs. | ||
| + | |||
| + | In practise, it takes three parameters. | ||
| + | |||
| + | aiexec.py <AI Name> < | ||
| + | | ||
| + | The **dir** parameter points to a folder where the JSON files that describe your AIs are stored. Each of those files should be in the [[cognition_file_format]]. | ||
| + | |||
| + | The **AI Name** is the name of the AI, minus the //.json// extension. | ||
| + | |||
| + | There are several different options for the //Action// parameter... | ||
| + | |||
| + | ===Actions=== | ||
| + | |||
| + | ^Action^Description^ | ||
| + | |gather|Download the training data for this AI, deleting any existing data| | ||
| + | |build|Train the AI, if required| | ||
| + | |retrain|Train the AI, deleting the existing AI if needed| | ||
| + | |regen|Regenerate the entire AI| | ||
| + | |test|Test the AI against its training data to determine accuracy| | ||
| + | |coverage|Create a [[coverage report]] for this AI| | ||
| + | |now|Executing the AI based on the current live values. Will also gather raw data and train the AI if required.| | ||
| + | |curinputs|Get the current input values| | ||
| + | |run|Run the AI. Requires the //start//, //end// and //grain// parameters| | ||
| + | |find|Find events using the AI. Requires the //start//, //end// and //grain// parameters| | ||
| + | |inputs|Gets a list of the inputs to this AI| | ||
| + | |correct|Make a manual correction to the AI| | ||
| + | |addsample|Adds a new sample time to the training data. Uses the //start// and optionally the //end//, //inputs//, //outputs// and //root// parameters| | ||
| + | |||
| + | ===Extra Parameters=== | ||
| + | |||
| + | ^Parameter^Used For^Example^ | ||
| + | |--force|now|A comma-delimited list of inputs that you'd like to force to a specific value. Leave an option empty (ie. ",," | ||
| + | |--inputs|correct|A comma-delimited list of the //AI Inputs// you'd like to manually correct the //output// for| | ||
| + | |--outputs|correct|A comma-delmited list of the //AI Outputs// you'd like to get for the given //AI Inputs//.| | ||
| + | |--start|run, | ||
| + | |--end|run, | ||
| + | |--grain|run, | ||
| + | |--root|run, | ||
| + | |--format|run|The output format for the run data| | ||
| + | |--span|run|When being used over long time periods, //span// controls the size of the ' | ||