Kine
====
Kine is meant to run as a blackbox which takes in candidate solution data,
performs a series of algorithms, and produces new candidates. It may be run
iteratively.
Kine is the archaic plural of cow. Cattle are a classic example of
selective-breeding.
Requirements
------------
Kine takes a map of data (stored in a database or loaded from a dump),
interprets it as a cellular automaton, and performs genetic algorithms to
reach a controlled ("perfect") state.
The number of steps made by the algorithm determines in part the fitness of
the candidate organism.
Design
------
### Infrastructure
This is deployable on the network as:
* a Kubernetes cluster
* individual OCI containers
* a pacman (makepkg) client-server pair (rc-service daemon)
* a single executable (probably storing data in /var/kine/).
### Architecture
+--------+-----------------------------------------+
| path | description |
+--------+-----------------------------------------+
| /src/ | top-level application layer source code |
| /data/ | data used for mocking |
| /cfg/ | build, run, packing, and deploy config |
| /run/ | start scripts and manifest files |
+--------+-----------------------------------------+
### Tooling
TODO: Investigate submodules and subtree.
The core application will be written in Rust.
A TUI frontend will be written in Rust.
Databases will be SQLite(mocking) and Postgres(full).
TODO: Investigate Redis.
Web servicization will use Rocket.
Styling will use W3.css.
Cytoscape (or Canvas, SVG, something more Rustic) will handle visualization.
Changelog
---------
It is currently written in the simpler languages of the web (HTML5/JS/CSS3).
* [X] Update README.
* [ ] Spec-out application architecture.
TODO
----
### core
* [ ] Rewrite the chromosome class.
* [ ] Add the genetic operations.
* [ ] Write cellular automaton trait.
* [ ] Rewrite the organism class.
* [ ] Add evaluation module.
* [ ] Daemonize? This may be necessary for system installation but not container deployment.
### config
* [ ] Replace license with BSD/MIT/Apache.
* [ ] runlevels
* [ ] loglevels
* [ ] database config
### pipeline
* [ ] Write a build container for Rust[1].
* [ ] Write a runtime stage.
* [ ] Write a packaging container.
* [ ] Pipeline with Dagger.
* [ ] Documentation generation stage.
* [ ] Kroki integration.
### Frontend
#### TUI
* [ ] Write a TUI for "kinectl -t".
#### Web
##### Model
* [ ] Integrate templating (Rocket built-in).
* [ ] Refactor HTML.
* [ ] Add Bestiary
* [ ] Add Tree
##### View
* [ ] Integrate W3.css