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

Conditional Pass-through, Filters #7

Open
ghost opened this issue Mar 29, 2017 · 8 comments · May be fixed by #10
Open

Conditional Pass-through, Filters #7

ghost opened this issue Mar 29, 2017 · 8 comments · May be fixed by #10

Comments

@ghost
Copy link

ghost commented Mar 29, 2017

This is an awesome tool, thank you!

I have a suspicion, that with one addition this could be turing-complete (I don't have proof, just gut feeling). Also, this feature would help people to mirror and demonstrate simple natural networks like prototypical neural networks or simple gene-regulatory networks.

The idea, simply, is to allow nodes to 'decide' whether to pass through, or consume, an arrow. The two most useful 'functions' I can imagine are to simply filter arrows by polarity (e.g., nodes that can consume but not pass-through negative arrows, but pass-through positive arrows), and to pass-through only if the node is fuller than a certain threshold, or less-full than a threshold.

For neurons, for example, you could then mimic threshold-firing behaviour using a pattern like:

(input)--->(threshold 0.9)---(filter(positive))--->(output)
                ^   |
                |   V
(feed-back emits positive *and* negative)

So, when input pushes threshold over fullness 0.9, it starts to pass-through, and the next input triggers a cascade of positive and negative arrows (more negative than positive, though). The positives are allowed through by the filter, and hit output. The negatives pull the neuron back below its threshold, and the cycle begins again.

This is a bit of a big ask, so I'd understand if it's overcomplicated for what loopy's designed to do.

I do feel that these thresholds would improve some of the example simulations, though; for example, in the automation/job scenario, you can use these to model how social unrest only starts to cause political upheaval above a certain threshold, or how tax income only increases until unemployment hits a certain threshold, and then may start to crash as consumer spending halts.

@ghost
Copy link
Author

ghost commented Mar 29, 2017

Come to think of it, combined with feedback loops, both of the above might be possible to model with just one behaviour: an option to have nodes consume arrows until either full or empty, and then "overflow" in either case.

So, an overflow-enabled node that receives enough negative input would start permitting negative arrows when it's empty. Or, if it receives enough positive arrows, it would start overflowing and allow positives to pass-through. Combined with a simple feedback loop it could then act like a threshold or "emit once, then reset" node. If allowed to just overflow in one direction, it would act a bit like a filter.

@ncase
Copy link
Owner

ncase commented Mar 29, 2017

I like this idea! In general, I just like the idea of making something "technically Turing-complete".

Would it still work if it was the relationships that had the asymmetric logic? For example, an arms race. US getting more nukes means USSR will get more nukes, and vice versa. Positive feedback loop. But the converse is NOT true. US reducing their nukes will not (by itself) lead to the USSR reducing their nukes, nor vice versa. So, if arrows/relationships could specify that they'd only take positive or only negative arrows –– would that be sufficient to model a gene-reg network?

@GalHorowitz
Copy link

@ncase I actualy think so. But not in the way he describes - it could still benefit the user in many things, it's just getting to the functionally that @cathalgarvey describes using this system would take LOTS of nodes, which because of no zomming/more space than canvas size is not possible.

@1000i100
Copy link

1000i100 commented Mar 6, 2020

Filter edge -> done in #20
overflow-enabled node -> done in #20
you can try it here : https://1000i100.github.io/loopy/v1.1/ and import your system (not breaking any compatibility)

@ghost
Copy link
Author

ghost commented Mar 6, 2020

Really cool to hear, thanks! :)

@ghost
Copy link
Author

ghost commented Mar 6, 2020

Kinda have a neural system going here now: accepts four inputs before triggering, then feeds back to reset. :)

@1000i100
Copy link

1000i100 commented Mar 7, 2020

I'm happy to please you ! :)

@1000i100
Copy link

1000i100 commented Apr 5, 2020

I've breaked it with my work since the last month, (and save to link is actually broken in my version, but export to json is usable)... But, there is many new features and you can play with it and talk me about them !

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

Successfully merging a pull request may close this issue.

3 participants