source: cpp/frams/genetics/fB/fB_conv.h @ 870

Last change on this file since 870 was 802, checked in by Maciej Komosinski, 7 years ago

Crossing over with less bloat, but still biologically-inspired

File size: 1.1 KB
Line 
1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
4
5#ifndef _FB_CONV_H_
6#define _FB_CONV_H_
7
8#include <frams/genetics/genoconv.h>
9#include "../fH/fH_general.h"
10
11class GenoConv_fBH : public GenoConverter
12{
13private:
14        bool getNextCharId(const SString& genotype, int &i);
15        double convertCharacterTo01(char c);
16        double convertCharacterToWeight(char c);
17        static fH_Handle* convertCharacterToHandle(char c, int dims, int start, int end, std::vector<IRange> ranges[3]);
18        int processNextLetter(fH_Builder &creature, fH_Handle *&currhandle, Param &par, const SString& gene, int &propindex, int &i, std::vector<IRange> ranges[3], int &nclassdefcount);
19        bool getNeuroClass(const SString& gene, SString &def, int nclassdefcount);
20
21public:
22        GenoConv_fBH() :GenoConverter()
23        {
24                name = "Biological encoding";
25
26                in_format = 'B';
27                out_format = 'H';
28                mapsupport = 1;
29        }
30        SString convert(SString &i, MultiMap *map, bool using_checkpoints);
31        ~GenoConv_fBH() {};
32};
33
34#endif //_FB_CONV_H_
Note: See TracBrowser for help on using the repository browser.