jameschch / LeanOptimization

Genetic optimization using LEAN
Apache License 2.0
50 stars 14 forks source link

Better integration with current Lean #12

Closed worthy7 closed 6 years ago

worthy7 commented 7 years ago

Just some ideas:

1) Pull out the data path from the lean config 2) Detect which algorithm to run upon by using reflection on an "IOptimizedAlgorithm" interface

jameschch commented 7 years ago

I plan fairly soon to change the config so it just takes a Lean base path and pulls in the config and dll's from there. The idea with the data directory is that it is an override for the config.json setting so you can target different paths in the optimizer than the main clone. Useful when executing remotely.

What would happen if two or more algorithms implement the IOptimizedAlgorithm interface (edit: how would this be different from inheriting the base QCAlgorithm)? Also, it's desirable to not require any modification to Lean (even though this is not true currently).

worthy7 commented 7 years ago

I see, I suppose you're correct, we can just do some reflection right now on the QCAlgorithm to fine the class we need to work with. I can see what you're saying regarding the interface. If we really want to keep LO separate from Lean, then an interface would only cause a dependency loop anyway.

jameschch commented 7 years ago

You're right though, the integration needs changing.

jameschch commented 7 years ago

The optimizer just supplies a config override. Everything else is lean managed.

worthy7 commented 7 years ago

I noticed a few changes recently, is this done now?