There is an ongoing transfer process from Vita. However, many features are available and fully functional.
Compared to Vita, this framework a major breakthrough but it isn't production-ready yet (approximate view of the process).
Ultra is a scalable, high performance evolutionary algorithms framework.
It's suitable for classification, symbolic regression, content base image retrieval, data mining and software agents control, mathematical optimization and scheduling. Main features include:
- concurrency support
- modern, standard ISO C++20 source code
- flexibility and speed
- easy integration with other systems
- simple addition of features and modules
- fast experimentation with detailed run-log
- more
This software is a complete rewrite of Vita. The code has been restructured, simplified and if now less research oriented; however it retains all the useful aspects of the original project and fully supports concurrency. If you're transitioning from Vita, take a look at the migration notes.
The core operation is:
de::problem prob(dimensions, {-5.12, 5.12});
prob.params.population.individuals = 50;
prob.params.evolution.generations = 1000;
de::search search(prob, rastrigin_func);
auto res(search.run());
auto solution(res.best_individual);
auto value(res.best_measurements.fitness);
Further details in the specific tutorial.
// DATA SAMPLE (output, input)
// (the target function is `x + sin(x)`)
std::istringstream training(R"(
-9.456,-10.0
-8.989, -8.0
-5.721, -6.0
-3.243, -4.0
-2.909, -2.0
0.000, 0.0
2.909, 2.0
3.243, 4.0
5.721, 6.0
8.989, 8.0
)");
// READING INPUT DATA
src::problem prob(training);
// SETTING UP SYMBOLS
prob.insert<real::sin>();
prob.insert<real::cos>();
prob.insert<real::add>();
prob.insert<real::sub>();
prob.insert<real::div>();
prob.insert<real::mul>();
// SEARCHING
src::search s(prob);
const auto result(s.run());
It's pretty straightforward (further details in the specific tutorial).
This is a machine learning examples that classifies sonar data into two categories (rocks vs mines):
// READING INPUT DATA
src::dataframe::params params;
params.output_index = src::dataframe::params::index::back;
src::problem prob("sonar.csv", params);
// SETTING UP SYMBOLS
prob.setup_symbols();
// SEARCHING
src::search s(prob);
s.validation_strategy<src::holdout_validation>(prob);
const auto result(s.run());
More information in the specific tutorial.
There is comprehensive documentation on the official site. You should probably start with the tutorials. Also, consider that the wiki on GitHub is the source for the ultraevolution.org site but may contain information regarding features not yet available in official releases.
Ultra is designed to have minimal requirements for building and use with your projects, though some are necessary. Currently, we support Linux and Windows. We will also make our best effort to support other platforms (e.g. macOS, BSD). However, since core members of the Ultra project have no access to these platforms, Ultra may have outstanding issues there. If you notice any problems on your platform, please use the issue tracking system; patches for fixing them are even more welcome!
- A C++20-standard-compliant compiler
- CMake
- Python v3 for additional functionalities
There are two ways of getting Ultra's source code: you can download a stable source release in your preferred archive format or directly clone the source from a repository.
Cloning a repository requires a few extra steps and some extra software packages on your system, but lets you track the latest development and make patches much more easily, so we highly encourage it.
Run the following command:
git clone https://github.com/morinim/ultra.git
This is a sketch of the resulting directory structure:
ultra/
doc/
misc/
src/
CMakeLists.txt
examples/ .............Various examples
kernel/ ...............Ultra kernel (core library)
test/ .................Test-suite
third_party/ ..........Third party libraries
utility/ ..............Support libraries / files
tools/ ..................Various tools related to development
CONTRIBUTING.md
LICENSE
README.md
SECURITY.md
cd ultra
cmake -B build/ src/
You're now ready to build using the underlying build system tool:
cmake --build build/
The output files are stored in sub-directories of build/
(out-of-source build).
Further details are available in the build walkthrough.
To install Ultra use the command:
cmake --install build/
(requires superuser, i.e. root, privileges)
Manual installation is also straightforward. There are just two files, both inside the build/kernel
directory:
- a static library (e.g.
libultra.a
under Unix); - an automatically generated global/single header (
auto_ultra.h
which can be renamed).
As a side note, to build the global header manually, use:
./tools/single_include.py --src-include-dir src/ --src-include kernel/ultra.h --dst-include mysingleheaderfile.h
(must be executed from the main directory of the repository)
Mozilla Public License v2.0 (also available in the accompanying LICENSE file).
Ultra uses semantic versioning. Releases are tagged.
When a release is not backward compatible due to API changes, the required modifications for upgrading are usually not too difficult.
So, don't be afraid of a different MAJOR version and read the release notes for details about the breaking changes.
USQUE AD FINEM ET ULTRA