Overview
Experiment class is the major part of this framework. It is a Unity component, that can be attached to an empty object, but it is usualy taken care of with ExperimentManager. It has a certain enforced flow that you can extend. This class is responsible for logging experiment state changes and events, keeping clear structure of function calls, keeps state of trials nad expeirment itself etc.
Experiment
Variables
| Variable | Purpose |
|---|---|
| Name | Name of the experiment. important for serialisation |
| TrialNumber | Tracks the trial number. |
| ExperimentNumber | In case we are runnign multiple experiments at the same time. |
| ExperimentState | Tracks the state of the expeirment |
Events
| Event | Purpose |
|---|---|
| ExpeirmentEventSent | Sends info about event being sent. Mostly for logging purposes. |
| TrialStateChanged | Sends info about change in trial state |
| TrialEventSent | Sends info for logging purposes. |
| MessageSent | Generic message event to logger. |
Functions
| Function | Purpose |
|---|---|
| StartExperiment | Starts the expeirment if possible. |
| TrialSetNext | Sets the trial to the next one if possible. |
| ForceNextTrial | Forces next trial. |
| ForceSetTrial | Forces the trial to be set to designated number |
| ForceFinishTrial | Finishes the trial in any state |
| FinishExperiment | Finishes the expeirment immediately |
| AddSettings | Override to allow adding different settings to implemetned expeiremnts |
| ExperimentHeaderLog | Logs the speicific header for each expeirment |
Experiment Settings
Class ExpeirmentSettings allow custom parameters for each expeirment. It allows serialisation and deserialisation and takes variable parameters according to your design.
Experiment Results
Class ExperimentResults is designed to take
Attributes
the class has two custom attributes [TestData] and [ResultData] to allow sequential and separate parsing. Just tag everything you want in your results as [ResultData] nad all the raw data as [TestData]. Unmarked values are not parsed in the Save() function.