Code Monkey home page Code Monkey logo

ultra's Introduction

Ultra Version

C++20 Build and test all platforms OpenSSF Best Practices License Twitter

UNDER DEVELOPMENT

There is an ongoing transfer process from Vita, and many features aren't available or fully functional.

This framework will be a major breakthrough but is currently far from being production-ready (approximate view of the process).

The source code is available for:

  • people or companies already using Vita who want experience the new library;
  • those who would like to sponsor the project.

OVERVIEW

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.

EXAMPLES

Mathematical optimization

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.

Symbolic regression

// 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).

Classification

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.

DOCUMENTATION

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.

BUILD REQUIREMENTS

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!

Mandatory

  • A C++20-standard-compliant compiler
  • CMake

Optional

GETTING THE SOURCE

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

THE ULTRA DISTRIBUTION

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

SETTING UP THE BUILD

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.

INSTALLING ULTRA

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)

LICENSE

Mozilla Public License v2.0 (also available in the accompanying LICENSE file).

VERSIONING

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.