![]() |
Ultra 0.9.4
|
Namespaces | |
| namespace | exception |
| namespace | integer |
Classes | |
| class | alps_layer_pair |
| struct | group_stat |
| class | analyzer |
| class | cache |
| struct | decision_vector |
| class | distribution |
| class | test_evaluator |
| class | evaluator_proxy |
| class | evolution |
| class | layered_population |
| struct | scored_individual |
| class | summary |
| class | evolution_status |
| class | evolution_strategy |
| class | alps_es |
| class | std_es |
| class | de_es |
| class | with_size |
| class | fitnd |
| class | function |
| struct | gene |
| class | interpreter |
| struct | locus |
| struct | is_bitmask_enum< symbol_init > |
| Enable bitmask operations for symbol_init. More... | |
| struct | hash_t |
| class | murmurhash3 |
| class | murmurhash3_sink |
| class | individual |
| struct | interval |
| class | linear_population |
| struct | model_measurements |
| class | nullary |
| struct | parameters |
| struct | problem |
| class | refiner |
| class | basic_search |
| class | search |
| class | search_log |
| class | search_stats |
| class | symbol |
| class | symbol_set |
| class | terminal |
| class | validation_strategy |
| class | as_is_validation |
| class | vector_individual |
Concepts | |
| concept | has_active_crossover_type |
| concept | DecisionVector |
| Checks whether a type models a concrete decision-vector representation. | |
| concept | DecisionVectorExtractable |
| Checks whether a type supports decision vector extraction. | |
| concept | NumericalOptimisable |
| Supports numerical optimisation via decision-vector perturbation. | |
| concept | ClearableEvaluator |
| concept | Evaluator |
| concept | Strategy |
| concept | RefinementStrategy |
| concept | Fitness |
| concept | MultiDimFitness |
| concept | Individual |
| concept | ArithmeticScalar |
| concept | RandomAccessIndividuals |
| concept | Population |
| concept | LayeredPopulation |
| concept | SizedRandomAccessPopulation |
| concept | PopulationWithMutex |
| concept | Symbol |
| concept | Terminal |
| concept | ValidationStrategy |
Typedefs | |
| using | bitwidth = unsigned |
| Type alias for the number of bits. | |
| template<class I> | |
| using | decision_vector_t |
| Concrete decision-vector type associated with I. | |
| template<Evaluator E> | |
| using | evaluator_individual_t = closure_arg_t<E> |
| template<Evaluator E> | |
| using | evaluator_fitness_t = closure_return_t<E> |
| template<Individual I, Fitness F> | |
| using | after_generation_callback_t |
| template<Individual I, Fitness F> | |
| using | on_new_best_callback_t |
| template<Evaluator E> | |
| using | refinement_callback_t |
| using | shake_function_callback_t = std::function<evaluation_context(unsigned)> |
| using | hash = murmurhash3 |
| using | hash_sink = murmurhash3_sink |
| using | population_uid = unsigned |
| using | D_VOID = std::monostate |
| using | D_INT = int |
| using | D_DOUBLE = double |
| using | D_STRING = std::string |
| using | D_NULLARY = nullary |
| using | D_ADDRESS = param_address |
| using | D_VARIABLE = src::variable |
| using | D_IVECTOR = std::vector<int> |
| using | value_t |
Enumerations | |
| enum class | dv_param_kind : unsigned char { real , integer } |
| Original scalar category used when writing back an optimised value. | |
| enum class | evaluation_context { unchanged , changed } |
| enum class | test_evaluator_type { realistic , fixed , random , age } |
| enum class | symbol_init : unsigned { disabled = 0 , variables = 1 , attributes = 2 , ephemerals = 4 , functions = 8 , all = 15 } |
| enum | domain_t { d_void = 0 , d_int , d_double , d_string , d_nullary , d_address , d_variable , d_ivector } |
Functions | |
| template<class Layer> | |
| alps_layer_pair (Layer &) -> alps_layer_pair< Layer > | |
| template<class Layer> | |
| alps_layer_pair (Layer &, Layer &) -> alps_layer_pair< Layer > | |
| template<class Layer> | |
| alps_layer_pair (const Layer &) -> alps_layer_pair< const Layer > | |
| template<class Layer> | |
| alps_layer_pair (const Layer &, const Layer &) -> alps_layer_pair< const Layer > | |
| template<LayeredPopulation P, Evaluator E> | |
| analyzer (const P &, const E &) -> analyzer< typename P::value_type, evaluator_fitness_t< E > > | |
| template<class E> | |
| void | invalidate_cache_if_supported (E &eva) |
| template<Evaluator E> | |
| bool | load_eva (std::istream &in, E *e) |
| template<Evaluator E> | |
| bool | save_eva (std::ostream &out, const E &e) |
| fitnd | operator* (fitnd::value_type v, fitnd f) |
| fitnd | operator- (fitnd f) |
| fitnd | abs (fitnd f) |
| fitnd | sqrt (fitnd f) |
| fitnd | operator+ (fitnd, const fitnd &) |
| fitnd | operator- (fitnd, const fitnd &) |
| fitnd | operator* (fitnd, const fitnd &) |
| fitnd | operator/ (fitnd, const fitnd &) |
| fitnd | operator* (fitnd, fitnd::value_type) |
| fitnd | operator/ (fitnd, fitnd::value_type) |
| bool | load (std::istream &, fitnd *) |
| std::ostream & | operator<< (std::ostream &, const fitnd &) |
| std::istream & | operator>> (std::istream &, fitnd &) |
| template<Fitness F> | |
| constexpr F | lowest () noexcept |
| template<std::integral F> | |
| bool | isfinite (F) noexcept |
| template<std::floating_point F> | |
| bool | isfinite (F f) |
| template<MultiDimFitness F> | |
| bool | isfinite (const F &f) |
| template<Fitness F> requires std::is_arithmetic_v<F> | |
| bool | dominating (const F &lhs, const F &rhs) |
| template<MultiDimFitness F> | |
| bool | dominating (const F &lhs, const F &rhs) |
| template<MultiDimFitness F> | |
| bool | almost_equal (const F &lhs, const F &rhs) |
| template<Fitness F> requires std::is_arithmetic_v<F> | |
| double | distance (F f1, F f2) |
| template<MultiDimFitness F> | |
| double | distance (const F &f1, const F &f2) |
| template<Fitness F> requires std::floating_point<F> | |
| bool | save (std::ostream &out, F f) |
| template<std::integral F> | |
| bool | save (std::ostream &out, F f) |
|
template<MultiDimFitness F> requires std::floating_point<std::ranges::range_value_t<F>> | |
| bool | save (std::ostream &out, const F &f) |
| template<std::floating_point F> | |
| bool | load (std::istream &in, F *f) |
| template<std::integral F> | |
| bool | load (std::istream &in, F *f) |
| value_t | run (const gp::individual &ind) |
| bool | operator< (const locus &l1, const locus &l2) noexcept |
| bool | operator> (const locus &l1, const locus &l2) noexcept |
| locus | operator+ (const locus &l, locus::index_t i) noexcept |
| std::ostream & | operator<< (std::ostream &s, const locus &l) |
| std::ostream & | operator<< (std::ostream &o, hash_t h) |
| std::span< const std::byte > | bytes_view (const std::string &s) noexcept |
| template<class T> requires (std::integral<T> || std::floating_point<T>) | |
| std::span< const std::byte, sizeof(T)> | bytes_view (const T &t) noexcept |
| std::ostream & | operator<< (std::ostream &os, const ultra::individual &ind) |
| template<Fitness F> | |
| auto | operator<=> (const model_measurements< F > &, const model_measurements< F > &) noexcept |
| template<Individual I, Fitness F> | |
| auto | operator<=> (const scored_individual< I, F > &, const scored_individual< I, F > &) noexcept |
| template<Evaluator E> | |
| search (problem &, E) -> search< E > | |
| std::filesystem::path | dynamic_from_basename (const std::string &basename) |
| std::filesystem::path | layers_from_basename (const std::string &basename) |
| std::filesystem::path | population_from_basename (const std::string &basename) |
| std::filesystem::path | summary_from_basename (std::filesystem::path basename) |
| std::filesystem::path | basename_from_summary (std::filesystem::path summary) |
| template<Symbol S> | |
| auto | get_if (const symbol *s) |
| template<Symbol S> | |
| auto | get_if (const symbol &s) |
| template<Symbol S> | |
| bool | is (const symbol *s) |
| std::ostream & | operator<< (std::ostream &, const symbol_set &) |
| bool | has_value (const value_t &v) noexcept |
| bool | basic_data_type (domain_t d) noexcept |
| bool | numerical_data_type (domain_t d) noexcept |
| const D_NULLARY * | get_if_nullary (const value_t &v) noexcept |
| std::ostream & | operator<< (std::ostream &o, const value_t &v) |
| bool | load (std::istream &in, const symbol_set &ss, value_t &v) |
| bool | save (std::ostream &out, const value_t &v) |
| constexpr param_address | operator""_addr (unsigned long long a) |
| bool | basic_data_type (const value_t &) noexcept |
| bool | numerical_data_type (const value_t &) noexcept |
| template<class T> | |
| bool | operator== (const vector_individual< T > &, const vector_individual< T > &) noexcept |
| template<class T> | |
| std::size_t | active_slots (const vector_individual< T > &) noexcept |
| bool | load (std::istream &in, fitnd *f) |
| std::ostream & | operator<< (std::ostream &o, const fitnd &f) |
| std::istream & | operator>> (std::istream &in, fitnd &f) |
| fitnd | operator+ (fitnd lhs, const fitnd &rhs) |
| fitnd | operator- (fitnd lhs, const fitnd &rhs) |
| fitnd | operator* (fitnd lhs, const fitnd &rhs) |
| fitnd | operator/ (fitnd lhs, const fitnd &rhs) |
| fitnd | operator/ (fitnd f, fitnd::value_type v) |
| fitnd | operator* (fitnd f, fitnd::value_type v) |
| fitnd | combine (const fitnd &f1, const fitnd &f2) |
| std::ostream & | operator<< (std::ostream &o, const symbol_set &ss) |
| template<class T> | |
| bool | operator== (const vector_individual< T > &lhs, const vector_individual< T > &rhs) noexcept |
| template<class T> | |
| std::size_t | active_slots (const vector_individual< T > &ind) noexcept |
Variables | |
| constexpr symbol_init | def_terminal_init |
The main namespace for the project.
| using ultra::after_generation_callback_t |
| using ultra::decision_vector_t |
Concrete decision-vector type associated with I.
| using ultra::on_new_best_callback_t |
| using ultra::population_uid = unsigned |
The numerical type used for population unique ID.
| using ultra::refinement_callback_t |
Refinement backend callback.
Backends are responsible for deciding whether a refined individual should replace the original one (return std::nullopt to leave the population unchanged).
When refinement is performed in parallel, this callback may be invoked concurrently for distinct candidate individuals. Implementations must be thread-safe and must synchronize access to shared state they capture.
| using ultra::value_t |
A variant containing the data types used by the interpreter for internal calculations / output value and for storing examples.
| enum ultra::domain_t |
Numerical ID of supported data types.
|
nodiscardstrong |
Describes whether an operation changed the semantic context used to evaluate individuals.
When the context changes, cached evaluator results may no longer be valid.
|
strong |
Bitmask flags for configuring symbol initialisation stages.
Can be combined using bitwise operators.
| [in] | f | a fitness value |
|
nodiscardnoexcept |
| [in] | d | domain to be checked |
|
nodiscardnoexcept |
| [in] | s | a string |
|
nodiscardnoexcept |
| [in] | t | a value belonging to a fundamental types |
|
nodiscard |
Taxicab distance between two vectors.
| [in] | f1 | first fitness value |
| [in] | f2 | second fitness value |
The taxicab distance between two vectors in an n-dimensional real vector space with fixed Cartesian coordinate system, is the sum of the lengths of the projections of the line segment between the points onto the coordinate axes.
|
nodiscard |
Pareto dominance comparison.
| [in] | lhs | first term of comparison |
| [in] | rhs | second term of comparison |
lhs dominates rhs (is a Pareto improvement) if:
|
nodiscard |
Attempts to retrieve a pointer to a specific derived symbol type.
| S | expected dynamic type, which must derive from symbol |
| [in] | s | reference to the symbol to inspect |
|
nodiscard |
Attempts to retrieve a pointer to a specific derived symbol type.
| S | expected dynamic type, which must derive from symbol |
| [in] | s | pointer to the symbol to inspect |
|
nodiscardnoexcept |
| [in] | v | container object |
|
nodiscardnoexcept |
Checks whether a given value_t contains a value.
| [in] | v | value to be checked |
| void ultra::invalidate_cache_if_supported | ( | E & | eva | ) |
Invalidates cached evaluator state if the evaluator exposes a compatible clear() member function.
|
nodiscard |
Checks whether a symbol is of a given derived type.
| S | expected dynamic type, which must derive from symbol |
| [in] | s | pointer to the symbol to inspect |
|
nodiscard |
| [in] | f | fitness to check |
| bool ultra::load | ( | std::istream & | in, |
| const symbol_set & | ss, | ||
| value_t & | v ) |
| [in] | in | input stream |
| [in] | ss | symbol set used for decoding d_address / d_nullary |
| [out] | v | value_t coming from the input stream |
| bool ultra::load | ( | std::istream & | in, |
| F * | f ) |
| [in] | in | input stream |
| [out] | f | load the fitness here |
| bool ultra::load_eva | ( | std::istream & | in, |
| E * | e ) |
Loads the persistent state of an evaluator, if supported.
| E | an Evaluator type |
| [in,out] | in | input stream |
| [in,out] | e | pointer to the evaluator instance |
This function provides optional persistence support for evaluators. If the evaluator type E defines a member function with the signature:
then that function is invoked. Otherwise, the evaluator is assumed to have no persistent state and the operation succeeds trivially.
|
nodiscardnoexcept |
| [in] | d | domain to be checked |
|
inlinenodiscardnoexcept |
| [in] | l | base locus |
| [in] | i | displacement |
| [in] | l1 | first locus |
| [in] | l2 | second locus |
| std::ostream & ultra::operator<< | ( | std::ostream & | o, |
| const value_t & | v ) |
Streams a value_t object.
| [out] | o | output stream |
| [in] | v | value to be streamed |
Mainly used for debugging. Both serialization and source code visualization require different / more information.
| std::ostream & ultra::operator<< | ( | std::ostream & | o, |
| hash_t | h ) |
Mainly useful for debugging / testing.
| [out] | o | output stream |
| [in] | h | hash signature to be printed |
|
inline |
| [out] | s | output stream |
| [in] | l | locus to print |
|
nodiscardnoexcept |
| [in] | lhs | first term of comparison |
| [in] | rhs | second term of comparison |
The comparison criterion is Pareto dominance (https://en.wikipedia.org/wiki/Pareto_efficiency)
|
nodiscardnoexcept |
Orders two scored individuals by fitness.
| lhs | first scored individual |
| rhs | second scored individual |
The comparison is based only on the fitness value and is intended for ranking and selection purposes (e.g. best/worst individual).
As a consequence, scored_individual does not model a totally ordered type and cannot be used with default std::ranges::less. Algorithms requiring ordering should supply an explicit comparator or projection.
| [in] | l1 | first locus |
| [in] | l2 | second locus |
| value_t ultra::run | ( | const gp::individual & | ind | ) |
Executes the associated individual starting from its default entry point.
| [in] | ind | individual/program to be run |
This overload uses the individual's first available locus as the initial instruction pointer.
| bool ultra::save | ( | std::ostream & | out, |
| const value_t & | v ) |
| [out] | out | output stream |
| [in] | v | value_t to be saved |
|
nodiscard |
| [out] | out | output stream |
| [in] | f | fitness to be saved |
| bool ultra::save_eva | ( | std::ostream & | out, |
| const E & | e ) |
Saves the persistent state of an evaluator, if supported.
| E | an Evaluator type |
| [out] | out | output stream |
| [in] | e | evaluator instance |
This function provides optional persistence support for evaluators. If the evaluator type E defines a member function with the signature:
then that function is invoked. Otherwise, the evaluator is assumed to have no persistent state and the operation succeeds trivially.
| [in] | f | a fitness |
|
constexpr |
By default, the only terminals automatically initialised are variables and attributes. This is sensible because users can often deduce more appropriate ranges for ephemerals.