Skip to content
Karel Kubicek edited this page Feb 13, 2017 · 1 revision

Evaluators are modules for fitness computation based on circuit outputs.

Evaluators are identified by their "evaluator constant" (to be found in EACconstants) which is used in EACirc configuration file. Every evaluator has to be inherited from abstract IEvaluator interface and provide implementation the prescribed methods. Evaluators should be deterministic and depend solely on provided test vectors and circuit outputs. If project-specific operations are needed (e. g. hash functions, ciphers, ...), evaluator can be implemented within the project (for details, see Projects information).

Currently implemented evaluators

  • Hamming Weight Evaluator (24)
    Test vectors are considered as coming from 2 stream, differentiated by top bit of the expected output byte. Circuit outputs are mapped into categories according to their Hamming weight, all output bytes are considered together. For each stream there is a separate category map. Fitness is based on weighed Euclidean distance of corresponding categories.
  • Top Bit Evaluator (25)
    Test vectors are considered as coming from 2 stream, differentiated by top bit of the expected output byte. Circuit outputs are interpreted by looking at the top bit of each byte separately. Fitness is computed as a ratio of correctly predicted test vectors and all test vectors.
  • Categories Evaluator (26)
    Test vectors are considered as coming from 2 stream, differentiated by top bit of the expected output byte. Circuit output bytes are mapped into categories (value modulo number of categories), each byte is considered separately. For each stream there is a separate category map. Fitness is based on weighed Euclidean distance of corresponding categories.

Description of virtual IProject methods

All following methods are pure virtual and therefore are all required.

  • evaluateCircuit()
    Evaluate circuit outputs for a single test vector. Takes 2 inputs: actual circuit outputs on the test vector and expected test vector outputs (or any information provided by the project in the "expected output" bytes - e. g. used stream number for distinguishers). No value is returned, only internal state of the evaluator is updated.
  • getFitness()
    Return the circuit's fitness value based on the evaluated outputs provided so far. Typically called after all the test vectors from the set has been evaluated. Calling this method should not alter evaluator's internal state.
  • resetEvaluator()
    Resets the internal state of the evaluator. Typically called after evaluating the whole test set and preparing for a new test set or a new circuit.
  • shortDescription()
    Short human-readable description of the evaluator.
Clone this wiki locally