Implemented choice optimization algorithm.

Wrote all base classes and have working prototype of algorithm.