Skip to content

GokuMizuno/ClockEvolution

Repository files navigation

Some time ago I  saw a YouTube video by biologist cdk007, located at https://www.youtube.com/watch?v=mcAq9bmCeR0 that took basic clock parts, and using straight up competition, created clocks via evolution.

The work by cdk007 was a simulation designed in Matlab, and he challenged readers to redo the results in another language, just to show that this is not a feature of Matlab.  His implementation is in the Clock Evolution Functions folder.

I am going to redo his application in C++.  Since I don't speak Matlab, there are probably going to be quite a few differences in our implementations.

V0.1
Clock::Clock works.
Clock::show() works.
Clock::Generation() works.
Clock::isLocked() works.
Clock::Lock() works.
Clock::Unlock works.
I need to replace mrand() with a normal distro.

V 0.2
mrand() now returns a number between [0,1]
I can create multiple clock objects at once.
Score, mate, mutate do not work or are not tested.
Unable to save, yet.

Here are the files, and brief description of them.

User headers
stdafx.h - header file containing all the other header files.
Clock.h - header file containing declarations of the clock class.

User Cpp files
Clock.cpp - contains code for the clock class.
Mate.cpp - contains the mate and mutate functions

Pre-built headers
iostream - handles terminal input and output
fstream - reads/writes to a file.  Contains iostream.
cmath - needed for log() function in mrand()
time.h - needed to seed rand() function
cstdlib - needed for rand() function
vector - needed for vector that holds list of clock object pointers for quick access

TODO:
Get program actually working.
Make multithreaded.
Make CUDA enabled.
Wrap in GUI.  QT is a good cross-platform GUI.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published