I initially converted my GA from Python to C++ on this branch. I used ChatGPT to do it quickly, so it is very badly optimized and prone to bugs. The tasks to do for this issue are:
[x] Fix bugs in mutation and fitness functions that cause vectors to go out of bounds - there are some commented lines in mutation and fitness that cause that and they should be uncommented and working (but the rest uncommented also should be checked whether they might be prone for that bug, because it still appears sometimes),
[x] Fix bug that causes optimal solutions to include only the lowest values (usually under 12) - there is likely a fragment of fitness function that promotes that. We usually perform operations on MIDI values mod 12, but values themselves should be somewhere in the middle of 0-127 range. Values -1 and -2 are ok as they mean pause and extension of melody consecutively,
[x] compare codes in Python and C++ whether they actually do the same,
[ ] optimize code in C++ so that it works faster - it is important for our plugin to generate solutions as quickly as possible. Used data structures and data types are predominantly chosen by chat and they probably should be changed.
[x] Fix uniform_distribution error that min and max values are incorrect (probably right bound is smaller than left)
I initially converted my GA from Python to C++ on this branch. I used ChatGPT to do it quickly, so it is very badly optimized and prone to bugs. The tasks to do for this issue are: