Experiment

A Korali Experiment describes the Problem to be solved, and the method to use to solve it. A detailed explanation on how to configure and run an experiment, see Korali Usage Basics.

Usage

k = korali.Experiment()

Configuration

These are settings required by this module.

Random Seed
  • Usage: e[“Random Seed”] = unsigned integer

  • Description: Specifies the initializing seed for the generation of random numbers. If 0 is specified, Korali will automatically derivate a new seed base on the current time.

Preserve Random Number Generator States
  • Usage: e[“Preserve Random Number Generator States”] = True/False

  • Description: Indicates that the engine must preserve the state of their RNGs for reproducibility purposes.

Distributions
  • Usage: e[“Distributions”] = List of Distribution/Univariate

  • Description: Represents the distributions to use during execution.

Variables
  • Usage: e[“Variables”] = List of Variable

  • Description: Sample coordinate information.

Problem
  • Usage: e[“Problem”] = Problem

  • Description: Represents the configuration of the problem to solve.

Solver
  • Usage: e[“Solver”] = Solver

  • Description: Represents the state and configuration of the solver algorithm.

File Output / Path
  • Usage: e[“File Output”][“Path”] = string

  • Description: Specifies the path of the results directory.

File Output / Use Multiple Files
  • Usage: e[“File Output”][“Use Multiple Files”] = True/False

  • Description: If true, Korali stores a different generation file per generation with incremental numbering. If disabled, Korali stores the latest generation files into a single file, overwriting previous results.

File Output / Enabled
  • Usage: e[“File Output”][“Enabled”] = True/False

  • Description: Specifies whether the partial results should be saved to the results directory.

File Output / Frequency
  • Usage: e[“File Output”][“Frequency”] = unsigned integer

  • Description: Specifies how often (in generations) will partial result files be saved on the results directory. The default, 1, indicates that every generation’s results will be saved. 0 indicates that only the latest is saved.

Store Sample Information
  • Usage: e[“Store Sample Information”] = True/False

  • Description: Specifies whether the sample information should be saved to samples.json in the results path.

Console Output / Verbosity
  • Usage: e[“Console Output”][“Verbosity”] = string

  • Description: Specifies how much information will be displayed on console when running Korali.

  • Options:

    • Silent”: Prints no information to console, except in case of errors.

    • Minimal”: Prints minimal information about the progress of the engine.

    • Normal”: Prints information about the progress of the engine, plus information on the solver/problem.

    • Detailed”: Prints detailed information about the progress of the engine, plus detailed information on the solver/problem.

Console Output / Frequency
  • Usage: e[“Console Output”][“Frequency”] = unsigned integer

  • Description: Specifies how often (in generations) will partial results be printed on console. The default, 1, indicates that every generation’s results will be printed.

Default Configuration

These following configuration will be assigned by default. Any settings defined by the user will override the given settings specified in these defaults.

{
"Console Output": {
    "Frequency": 1,
    "Verbosity": "Normal"
    },
"Current Generation": 0,
"Distributions": [],
"File Output": {
    "Enabled": true,
    "Frequency": 1,
    "Path": "_korali_result",
    "Use Multiple Files": true
    },
"Is Finished": false,
"Preserve Random Number Generator States": false,
"Random Seed": 0,
"Store Sample Information": false
}