Empirical
Classes | Namespaces
NK.h File Reference

This file provides code to build NK-based algorithms. More...

#include <array>
#include "../base/vector.h"
#include "../tools/BitVector.h"
#include "../tools/math.h"
#include "../tools/memo_function.h"
#include "../tools/Random.h"

Go to the source code of this file.

Classes

class  emp::NKLandscape
 
class  emp::NKLandscapeMemo
 

Namespaces

 emp
 If we are in emscripten, make sure to include the header.
 

Detailed Description

This file provides code to build NK-based algorithms.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2016-2018

Two version of landscapes are provided. NKLandscape pre-calculates the entire landscape, for easy lookup. NKLandscapeMemo does lazy evaluation, memorizing values when they're first used. NKLandscape is faster, but goes up in memory size exponentially with K. NKLandscapeMemo is slightly slower, but can handle arbitrarily large landscapes.

Todo:
Right now we make the library user decide between NKLandscape and NKLandscapeMemo. Based on K value, we should be able to do this automatically, so we could merge the two.