YABOONS is a C++ library implemented during Intelligent Robotic System that has been used for an experiment with Genetic Algorithm and ARGoS.
It is meant to be used for experimenting Boolean Network and to help developers to implement faster BN without spending too much time in implementation.
For the description and further information on how this library works, I suggest you to read this article on my blog.
- It is written using
C++11
. - CMake
>= 3.0.0
is mandatory. - It has been tested only on Ubuntu OS.
- It requires no more library.
- Graphviz is not required by this library, but it is needed if you want to print the graph created.
The library has been divided in two main namespaces:
BNCore
: it contains all the parts which are used to create a Boolean NetworkBNSimulator
: it contains all the simulator which uses BNCore to create a BN from scratch and from file (currently it does not work)
This namespace is used to group all the parts of the library which are related to build a BN and make it work. It has been divided as follows:
Nodes
: it is the part which implements the Structure of the BN. As this library has many feature, the Node object could be initialized in many different ways that differs from the type of network you want to create. Generally, a Node is composed by anid
which identifies it in the network,type
which identifies Input/Output/Hidden or Generic nodes. If a Node is generated by a RBN Simulator, it will also haveK
which is the number of inputs per node andb
which is the bias.Nodes
class represent an aggregator ofNode
object. It contains operations related to the management of the Node and some operation for the generation of the connections and transition tables of the node. EveryNode
contains aTransitionTable
which contains anInputTable
.TransitionTable
could be generated randomly using the bias or they can be manually defined by the developer.States
: it is the part which implements the past,current and future State of the BN. AsNode
,State
is the unit which identifies the state of a node in a BN at a fixed time t.States
is the aggregator ofState
which contains all the operations for manage and modifyState
objects.Attractor
andTransient
will then identify two class which aggregatesStates
object. Look at this article for understand how they work.Transient
andAttractor
will then form theStateSuccession
object which is the result obtained by an evaluation process that is meant to be used as history.Evaluation
: it is the part which implements the evaluation phase. It supports the Deterministic and Synchronous Boolean Network Model.Exceptions
: it contains some of the errors that may be triggered during the execution of the library.BNOutput
: this class contains all the methods for the generation of File related to the structure or related to the succession of the states.
This namespace contains all the related class which implements Boolean Networks. This means that the Factory class and all the related instances are inside it. If you want to create a new class that is related to a particular implementation of Boolean Network, this is the place where you have to add it.
Some examples have been implemented to help you understand how this library works.
DerridasExampleMain.cpp
: experiment implemented following this paper. It will produce CSV for looking at the data and plot them and txt for logging purposesRandomBooleanNetworkMain.cpp
: generation of RBNBooleanNetworkMain.cpp
,AllAttractorsBNMain.cpp
: How to create and execute a Boolean Network using this library.
By now, this library may need some improvement which could be:
- Files are currently not working. This fix will be soon pushed.
- Code improvements. Some parts need some revision.
- Evaluation part could be extended. This library actually works only with deterministic and synchronous Boolean Networks as my project require them. Looking at this paper, there are many other types which could be implemented.
- CUDA implementation. It is an improvement that may not be useful for the purposes, but it could help me to learng GPGPU programming
Please take a look to Roadmap project to keep you updated about modification that are in progress or not.
- In this release, I will publish this code to GitHub.
- It has been fixed an issue in TransitionTable class.
- README completed but not reviewed
- All the Boolean Networks which required CSV file read has not been committed yet. There are some issues that will be fixed in the next releases.
This library has been designed and developed by me. I am happy to share this code with you. If you would like to contribute, please let me know if there are some issues. I am busy in this period but I will do my best to maintain this code. If you have any suggestion or question, you can contact me at the following email. I will reply as soon as possible.
Contributors:
- L.Santonastasi: luca.santonastasi@outlook.com
Finally, I would like to thank Professor Andrea Roli for his support and his suggestion during the implementation of this library.