Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QoL improvements when declaring strategies #43

Open
DrChainsaw opened this issue Sep 10, 2019 · 0 comments
Open

QoL improvements when declaring strategies #43

DrChainsaw opened this issue Sep 10, 2019 · 0 comments

Comments

@DrChainsaw
Copy link
Owner

A pattern of chaining strategies like has emerged in this form:
``` PrimaryStrategy(params..., FallBackStrategy1(params..., FallBackStrategy2(params... etc````

While I do like the flexibility this offers functionally, it tends to look like dogbarf in the code which declares it.

Real life horror example:

(RemoveStrategy(CheckAligned(CheckNoSizeCycle(ApplyMutation(SelectOutputs(select = SelectDirection(OutSelect{NaiveNASlib.Exact}(NaiveNASlib.LogSelectionFallback("Reverting...", NoutRevert()))), valuefun = default_neuronselect, align=IncreaseSmaller(DecreaseBigger(AlignSizeBoth(FailAlignSizeWarn()))))), FailAlignSizeWarn(msgfun = (vin,vout) -> "Can not remove vertex $(name(vin))! Size cycle detected!"))))

One small thing which could give a little payoff is to just allowing setting the last fallback strategy (usually either throw error or do nothing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant