# Flip-flop

**URL:** <http://discourse.iapct.org/t/flip-flop/4454>\
**Category:** CSG2017\
**Created:** [October 21, 2017, 2:16pm UTC](http://discourse.iapct.org/t/flip-flop/4454 "2017-10-21T14:16:03Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![rupert](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rupert](http://discourse.iapct.org/u/rupert)\
**Post date:** [October 21, 2017, 2:16pm UTC](http://discourse.iapct.org/t/flip-flop/4454/1 "2017-10-21T14:16:03Z")

</div>

[From Rupert Young (2017.10.21 11.00)]

```
  Martin, I thought I'd model and run your flip-flop function to

```

see it in action, but it’s not quite working as I would have  
expected.

```
  The circuit diagram configuration is attached. The triangles are

```

PCT control systems, but in this case only the perceptual  
functions are configured.

```
  Here is the output from the nodes, with Aness and Bness as sines

```

of different frequencies. (Note: colours are swapped on each  
graph; due to bug).

```
  Is this what you would have expected? As the "sum" nodes are

```

accumulators and Aness is initially stronger (after time 3.0E-4)  
the B value is suppressed negatively and never recovers.

![bmdfejkelfncklfg.png](http://discourse.iapct.org/uploads/default/original/1X/39ffb5c3b95858dd396d843a888f37595af493e7.png)

Any suggestions for modifications?

Regards,

```
Rupert

```

[Category.pdf](http://discourse.iapct.org/uploads/short-url/bvi9RlZCCR12c6mrk6WUXoscNaj.pdf) (17.7 KB)

---

<div class="post-metadata">

**Author:** ![MartinT](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@MartinT](http://discourse.iapct.org/u/MartinT)\
**Post date:** [October 21, 2017, 2:53pm UTC](http://discourse.iapct.org/t/flip-flop/4454/2 "2017-10-21T14:53:56Z")

</div>

[Martin Taylor 2017.10.21.10.21]

> [From Rupert Young (2017.10.21 11.00)]
> 
> Martin, I thought I'd model and run your flip-flop function to see it in action, but it's not quite working as I would have expected.
> 
> The circuit diagram configuration is attached. The triangles are PCT control systems, but in this case only the perceptual functions are configured.
> 
> Here is the output from the nodes, with Aness and Bness as sines of different frequencies. (Note: colours are swapped on each graph; due to bug).
> 
> Is this what you would have expected? As the "sum" nodes are accumulators and Aness is initially stronger (after time 3.0E-4) the B value is suppressed negatively and never recovers.

A couple of points. The output of each should be bounded, so your curves would show flat tops. The cross connections are from A output to B perceptual input and vice-versa, not across the A-ness and B-ness perceptions, and those cross connections should have weights that you (the experimenter) can vary both above and below -1, so each suppresses the perceptual input of the other. A then perceives Aness + Wba\*B and B perceives Bness + Wab\*A, where the Wxy are both less than zero. This double inhibition sets up a positive feedback loop that includes the perceptions of both A and B. That loop would explode to infinity if the A and B outputs were not limited and if Wab\*Wba \> 1. You want it to explode only up to the output limit of A or B, with the other one going down to a lower limit, which in practical cases is usually zero.

I don't think it matters what the lower limit is, though it might have to be non-negative. A negative lower limit is something I've never tried or analyzed, so I can't be sure. In any case, the flip-flop will only flip (or flop) if the incoming X-ness value is big enough to overcome the Wyx\*Y negative input from the Y side. The "micro-time" set of events that then happens is that the slightly positive X output begins to subtract from the Y-ness input to Y. If that is enough to bring the Y output even a tiny amount below its limiting value, the suppression of X will be reduced, increasing the initially slight suppression of Y, and the positive feedback explosion bangs the Y output against its upper limit and the X output against its lower limit.

The pair show hysteresis if Wxy\*Wyx\>1, meaning that you would be able to find values of Xness and Yness that sometimes yield X and not Y, and at other times yield Y and not X, depending on what the outputs had recently been. If Wxy\*Wyx=1, the system will be sensitive to the slightest noise and may drift either way. If Wxy\*Wyx \<1, there's no flip-flop action, but the ratio of outputs between X and Y will exaggerate the ratio between Xness and Yness, turning the flip-flop "decision maker" into a system that is sensitive perceptually to category boundaries but can perceive variations within the categories, as happens in human perception of, say, vowels.

Martin

---

<div class="post-metadata">

**Author:** ![rupert](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rupert](http://discourse.iapct.org/u/rupert)\
**Post date:** [October 23, 2017, 12:46pm UTC](http://discourse.iapct.org/t/flip-flop/4454/3 "2017-10-23T12:46:05Z")

</div>

[From Rupert Young (2017.10.23 13.45)]

Take 2: Is this more what you were expecting?

```
  A/B are sigmoidally bounded between 0 and 1. The weights are

```

-1.5.

Some interesting shapes, but doesn’t look quite right to me.

 ![kcpkkmbllnfokbin.png](http://discourse.iapct.org/uploads/default/original/1X/7897661e882af958465ba00f88138220fd863f13.png)

Regards,

Rupert

[Category1.pdf](http://discourse.iapct.org/uploads/short-url/iNz9P1yJFToBN7N2K4itKOC9l3u.pdf) (19.4 KB)

> **···**
>
> On 21/10/2017 15:53, Martin Taylor  
> wrote:
> 
> > ```
> > [Martin
> > 
> > ```
> > 
> > Taylor 2017.10.21.10.21]
> > 
> > > ```
> > > [From Rupert Young (2017.10.21 11.00)]
> > > 
> > > Martin, I thought I'd model and run your flip-flop function to
> > > 
> > > ```
> > > 
> > > see it in action, but it’s not quite working as I would have  
> > > expected.
> > > 
> > > ```
> > > The circuit diagram configuration is attached. The triangles are
> > > 
> > > ```
> > > 
> > > PCT control systems, but in this case only the perceptual  
> > > functions are configured.
> > > 
> > > ```
> > > Here is the output from the nodes, with Aness and Bness as sines
> > > 
> > > ```
> > > 
> > > of different frequencies. (Note: colours are swapped on each  
> > > graph; due to bug).
> > > 
> > > ```
> > > Is this what you would have expected? As the "sum" nodes are
> > > 
> > > ```
> > > 
> > > accumulators and Aness is initially stronger (after time 3.0E-4)  
> > > the B value is suppressed negatively and never recovers.
> > 
> > ```
> > A couple of points. The output of each should be bounded, so your
> > 
> > ```
> > 
> > curves would show flat tops. The cross connections are from A  
> > output to B perceptual input and vice-versa, not across the A-ness  
> > and B-ness perceptions, and those cross connections should have  
> > weights that you (the experimenter) can vary both above and below  
> > -1, so each suppresses the perceptual input of the other. A then  
> > perceives Aness + Wba_B and B perceives Bness + Wab_A, where the  
> > Wxy are both less than zero. This double inhibition sets up a  
> > positive feedback loop that includes the perceptions of both A and  
> > B. That loop would explode to infinity if the A and B outputs were  
> > not limited and if Wab\*Wba \> 1. You want it to explode only up  
> > to the output limit of A or B, with the other one going down to a  
> > lower limit, which in practical cases is usually zero.
> > 
> > ```
> > I don't think it matters what the lower limit is, though it might
> > 
> > ```
> > 
> > have to be non-negative. A negative lower limit is something I’ve  
> > never tried or analyzed, so I can’t be sure. In any case, the  
> > flip-flop will only flip (or flop) if the incoming X-ness value is  
> > big enough to overcome the Wyx\*Y negative input from the Y side.  
> > The “micro-time” set of events that then happens is that the  
> > slightly positive X output begins to subtract from the Y-ness  
> > input to Y. If that is enough to bring the Y output even a tiny  
> > amount below its limiting value, the suppression of X will be  
> > reduced, increasing the initially slight suppression of Y, and the  
> > positive feedback explosion bangs the Y output against its upper  
> > limit and the X output against its lower limit.
> > 
> > ```
> > The pair show hysteresis if Wxy*Wyx>1, meaning that you would
> > 
> > ```
> > 
> > be able to find values of Xness and Yness that sometimes yield X  
> > and not Y, and at other times yield Y and not X, depending on what  
> > the outputs had recently been. If Wxy_Wyx=1, the system will be  
> > sensitive to the slightest noise and may drift either way. If  
> > Wxy_Wyx \<1, there’s no flip-flop action, but the ratio of  
> > outputs between X and Y will exaggerate the ratio between Xness  
> > and Yness, turning the flip-flop “decision maker” into a system  
> > that is sensitive perceptually to category boundaries but can  
> > perceive variations within the categories, as happens in human  
> > perception of, say, vowels.
> > 
> > ```
> > Martin
> > 
> > ```

---

<div class="post-metadata">

**Author:** ![MartinT](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@MartinT](http://discourse.iapct.org/u/MartinT)\
**Post date:** [October 25, 2017, 4:14am UTC](http://discourse.iapct.org/t/flip-flop/4454/4 "2017-10-25T04:14:26Z")

</div>

[Martin Taylor 2017.10.23.17.16]

> [From Rupert Young (2017.10.23 13.45)]
> 
> Take 2: Is this more what you were expecting?
> 
> A/B are sigmoidally bounded between 0 and 1. The weights are -1.5.
> 
> Some interesting shapes, but doesn't look quite right to me.

No. I'm not quite sure what your circuit is, now you have a third layer intervening, and nothing coming from the outputs of A and B or the other functions. I guess I don't know what a function represents.

Let's simplify it.

We need to talk only about perceptual functions. I'm not sure what your triangles represent, but I will assume that there are two incoming analogue signals, Aness and Bness, and two perceptual functions, that produce outputs I label A and B. That's all there would be in my diagram. One layer only, unless you count the incoming analogue -ness values as a layer. You seem to have three layers, but I'm not clear whether you do, functionally.

As I would do it, the perceptual functions have two inputs each. The "A" perceptual function computes  
X = Aness + Wba\*B  
if X \<0, then X = 0  
if X \> 1, then X = 1.

The B perceptual function is the same, swapping A and B.

For simplicity try having Aness change linearly from, say, 0 to +4 and back again, while Bness changes from +4 to 0 and back again. Try changing the weights Wab and Wba from run to run, starting with both zero and moving both equally by reasonably small increments (say 0.2 at a time) down to something like -2.5. I'm not sure, but I think that at -1 there should be a critical point where you just start to see evidence of switching, and at -2 there should be a critical point at which the A and B outputs will never switch with the sawtooth values I suggested.

Martin

---

<div class="post-metadata">

**Author:** ![rupert](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rupert](http://discourse.iapct.org/u/rupert)\
**Post date:** [October 28, 2017, 4:44pm UTC](http://discourse.iapct.org/t/flip-flop/4454/5 "2017-10-28T16:44:04Z")

</div>

[From Rupert Young (2017.10.28 17.45)]

(Martin Taylor 2017.10.23.17.16]

> > ```
> > Some interesting shapes, but doesn't look quite right to me.
> > 
> > ```
> 
> ```
> No. I'm not quite sure what your circuit is, now you have a third
> 
> ```
> 
> layer intervening, and nothing coming from the outputs of A and B  
> or the other functions. I guess I don’t know what a function  
> represents.

```
There are outputs from A and B and the other functions. The arrows

```

show the flow of signals.

> ```
> Let's
> 
> ```
> 
> simplify it.
> 
> ```
> We need to talk only about perceptual functions. I'm not sure what
> 
> ```
> 
> your triangles represent, but I will assume that there are two  
> incoming analogue signals, Aness and Bness, and two perceptual  
> functions, that produce outputs I label A and B. That’s all there  
> would be in my diagram. One layer only, unless you count the  
> incoming analogue -ness values as a layer. You seem to have three  
> layers, but I’m not clear whether you do, functionally.

```
Yep, the triangles are PCT systems, but I am only using the

```

perceptual functions. The black circles are functions. I have what  
you have defined, just split into three layers rather than two.

> ```
> As I
> 
> ```
> 
> would do it, the perceptual functions have two inputs each. The  
> “A” perceptual function computes
> 
> ```
> X = Aness + Wba*B
> 
> if X <0, then X = 0
> 
> if X > 1, then X = 1.
> 
> ```

```
Yes, I have split this in to two functions;

    X = Aness + Wba*B --> Xsum

    if X <0, then X = 0 , if X > 1, then X = 1. --> X

```

> ```
> The B perceptual function is the same, swapping A and B.
> 
> For simplicity try having Aness change linearly from, say, 0 to +4
> 
> ```
> 
> and back again, while Bness changes from +4 to 0 and back again.  
> Try changing the weights Wab and Wba from run to run, starting  
> with both zero and moving both equally by reasonably small  
> increments (say 0.2 at a time) down to something like -2.5. I’m  
> not sure, but I think that at -1 there should be a critical point  
> where you just start to see evidence of switching, and at -2 there  
> should be a critical point at which the A and B outputs will never  
> switch with the sawtooth values I suggested.

```
Take three: I have implemented this.

![lnpjepkpojoefgmk.png|579x571](upload://yXtPlWdbhkg8I7ZqT7flGElIwTZ.png)

For the triangle wave amplitude of 4 a weight of 1.0 is the point at

```

which A/B switch from 1.0 to \<1.0.

```
If the weight < 1 then both A and B == 1 some of the time.

As the weight becomes larger the time both A and B < 1 increases.

I note a relationship between the amplitude and the weight (switch

```

point) of a = 2w+2.

```
Though couldn't this flip-flop functionality be achieved with the

```

rules

```
 if Aness > Bness then A = 1 and B = 0

 if Bness > Aness then A = 0 and B = 1

or is that the point?

This exercise shows the value of modelling proposed theories as

```

there may be more detail required that is apparent from an initial  
hypothesis.

```
Should this also work when the phases and frequencies of Aness and

```

Bness are different?

```
Rupert

```

[CategoryTriangle.pdf](http://discourse.iapct.org/uploads/short-url/h1JR9Fgi7iyuxziJHAAReteaCQ5.pdf) (18.5 KB)

---

<div class="post-metadata">

**Author:** ![MartinT](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@MartinT](http://discourse.iapct.org/u/MartinT)\
**Post date:** [October 28, 2017, 5:45pm UTC](http://discourse.iapct.org/t/flip-flop/4454/6 "2017-10-28T17:45:31Z")

</div>

[Martin Taylor 2017.10.28.12.56]

> [From Rupert Young (2017.10.28 17.45)]

> (Martin Taylor 2017.10.23.17.16]
> 
> > > ```
> > > Some interesting shapes, but doesn't look quite right to me.
> > > 
> > > ```
> > 
> > ```
> > No. I'm not quite sure what your circuit is, now you have a
> > 
> > ```
> > 
> > third layer intervening, and nothing coming from the outputs of  
> > A and B or the other functions. I guess I don’t know what a  
> > function represents.
> 
> ```
> There are outputs from A and B and the other functions. The arrows
> 
> ```
> 
> show the flow of signals.
> 
> > ```
> > Let's
> > 
> > ```
> > 
> > simplify it.
> > 
> > ```
> > We need to talk only about perceptual functions. I'm not sure
> > 
> > ```
> > 
> > what your triangles represent, but I will assume that there are  
> > two incoming analogue signals, Aness and Bness, and two  
> > perceptual functions, that produce outputs I label A and B.  
> > That’s all there would be in my diagram. One layer only, unless  
> > you count the incoming analogue -ness values as a layer. You  
> > seem to have three layers, but I’m not clear whether you do,  
> > functionally.
> 
> ```
> Yep, the triangles are PCT systems, but I am only using the
> 
> ```
> 
> perceptual functions. The black circles are functions. I have what  
> you have defined, just split into three layers rather than two.
> 
> > ```
> > As
> > 
> > ```
> > 
> > I would do it, the perceptual functions have two inputs each.  
> > The “A” perceptual function computes
> > 
> > ```
> > X = Aness + Wba*B
> > 
> > if X <0, then X = 0
> > 
> > if X > 1, then X = 1.
> > 
> > ```
> 
> ```
> Yes, I have split this in to two functions;
> 
> X = Aness + Wba*B --> Xsum
> 
> if X <0, then X = 0 , if X > 1, then X = 1. --> X
> 
> ```
> 
> > ```
> > The B perceptual function is the same, swapping A and B.
> > 
> > For simplicity try having Aness change linearly from, say, 0 to
> > 
> > ```
> > 
> > +4 and back again, while Bness changes from +4 to 0 and back  
> > again. Try changing the weights Wab and Wba from run to run,  
> > starting with both zero and moving both equally by reasonably  
> > small increments (say 0.2 at a time) down to something like  
> > -2.5. I’m not sure, but I think that at -1 there should be a  
> > critical point where you just start to see evidence of  
> > switching, and at -2 there should be a critical point at which  
> > the A and B outputs will never switch with the sawtooth values I  
> > suggested.
> 
> ```
> Take three: I have implemented this.
> 
> ![lnpjepkpojoefgmk.png|579x571](upload://yXtPlWdbhkg8I7ZqT7flGElIwTZ.png)
> 
> ```

```
This looks closer to what I expected, but it still doesn't look

```

quite right. Maybe it’s a question of sampling rate, but I would  
have expected A to start reducing some time before B reaches 1 and  
vice-versa. How often do you sample?

```
I'll try a little pseudo-code. I hope it's right, where "t-1" means

```

“at the previous sample moment”.

```
A(t) = if (Aness(t) + Wba*B(t-1)) >1 then 1

             esleif (Aness(t) + Wba*B(t-1)) <0 then 0

                  else (Aness(t) + Wba*B(t-1));

B(t) = if (Bness(t) + Wba*A(t-1)) >1 then 1

             esleif (Bness(t) + Wba*A(t-1)) <0 then 0

                  else (Bness(t) + Wba*A(t-1));

Is that effectively what you did? If it is, and the sampling rate is

```

fast compared to the switch-over duration, I will have to think  
harder!

> ```
> For the triangle wave amplitude of 4 a weight of 1.0 is the point
> 
> ```
> 
> at which A/B switch from 1.0 to \<1.0.
> 
> ```
> If the weight < 1 then both A and B == 1 some of the time.
> 
> As the weight becomes larger the time both A and B < 1
> 
> ```
> 
> increases.
> 
> ```
> I note a relationship between the amplitude and the weight (switch
> 
> ```
> 
> point) of a = 2w+2.
> 
> ```
> Though couldn't this flip-flop functionality be achieved with the
> 
> ```
> 
> rules
> 
> ```
> if Aness > Bness then A = 1 and B = 0
> 
> if Bness > Aness then A = 0 and B = 1
> 
> ```

```
That would be the same as a fixed infinite cross-loop product

```

Wab\*Wba. The variable weight product allows for a range of behaviour  
from slight contrast enhancement to full flip-flop with history. The  
history means that the system doesn’t stutter when |A-B| ≈ 0. The  
effect with history is called hysteresis, and it’s a useful property  
for a working system. It keeps A high and B low when Bness slightly  
exceeds Aness but A has been high in the preceding interval. Look at  
figure 9 in  
for an example of this kind of hysteresis.  
Oh, yes. I just suggested this simple opposition so as to produce  
easily interpreted graphs for the first go round. Now you seem to be  
close to having it, try the other extreme, smooth slow random  
variation of both A and B, or of only one of them while the other  
changes in a slow sawtooth, or something else that will show the  
different hysteresis effects at different values of Wab and Wba.  
Martin

> **···**
>
> [https://www.researchgate.net/publication/225324620\_Stochastic\_processes\_in\_reversing\_figure\_perception](https://www.researchgate.net/publication/225324620_Stochastic_processes_in_reversing_figure_perception)
> 
> > ```
> > or is that the point?
> > 
> > This exercise shows the value of modelling proposed theories as
> > 
> > ```
> > 
> > there may be more detail required that is apparent from an initial  
> > hypothesis.
> > 
> > ```
> > Should this also work when the phases and frequencies of Aness and
> > 
> > ```
> > 
> > Bness are different?

---

<div class="post-metadata">

**Author:** ![rupert](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rupert](http://discourse.iapct.org/u/rupert)\
**Post date:** [October 29, 2017, 4:31pm UTC](http://discourse.iapct.org/t/flip-flop/4454/7 "2017-10-29T16:31:46Z")

</div>

[From Rupert Young (2017.10.29 16.30)]

(Martin Taylor 2017.10.28.12.56]

> > ```
> > Take three: I have implemented this.
> > 
> > ![lnpjepkpojoefgmk.png|579x571](upload://yXtPlWdbhkg8I7ZqT7flGElIwTZ.png)
> > 
> > ```
> 
> ```
> This looks closer to what I expected, but it still doesn't look
> 
> ```
> 
> quite right. Maybe it’s a question of sampling rate, but I would  
> have expected A to start reducing some time before B reaches 1 and  
> vice-versa. How often do you sample?

```
Sample what?

It does (reduce) if you increase the weights (here to 10).

![oafogikblgeagpik.png|578x577](upload://iMU2FXTVEoqBkTs0zjxNYMTaf8q.png)

```

> ```
> I'll try a little pseudo-code. I hope it's right, where "t-1"
> 
> ```
> 
> means “at the previous sample moment”.
> 
> ```
> A(t) = if (Aness(t) + Wba*B(t-1)) >1 then 1
> 
> esleif (Aness(t) + Wba*B(t-1)) <0 then 0
> 
> else (Aness(t) + Wba*B(t-1));
> 
> B(t) = if (Bness(t) + Wba*A(t-1)) >1 then 1
> 
> esleif (Bness(t) + Wba*A(t-1)) <0 then 0
> 
> else (Bness(t) + Wba*A(t-1));
> 
> Is that effectively what you did? If it is, and the sampling rate
> 
> ```
> 
> is fast compared to the switch-over duration, I will have to think  
> harder!

```
Yes, that's about it.

```

> > if Aness \> Bness then A = 1 and B = 0
> > 
> > ```
> > if Bness > Aness then A = 0 and B = 1
> > 
> > ```
> 
> ```
> That would be the same as a fixed infinite cross-loop product
> 
> ```
> 
> Wab\*Wba. The variable weight product allows for a range of  
> behaviour from slight contrast enhancement to full flip-flop with  
> history. The history means that the system doesn’t stutter when
> 
> > A-B| ≈ 0. The effect with history is called hysteresis, and it’s  
> > a useful property for a working system. It keeps A high and B low  
> > when Bness slightly exceeds Aness but A has been high in the  
> > preceding interval. Look at figure 9 in  
> > for an example of this kind of hysteresis.

```
Thanks, I'll take a look.

```

> > ```
> > Should this also work when the phases and frequencies of Aness
> > 
> > ```
> > 
> > and Bness are different?
> 
> ```
> Oh, yes. I just suggested this simple opposition so as to produce
> 
> ```
> 
> easily interpreted graphs for the first go round. Now you seem to  
> be close to having it, try the other extreme, smooth slow random  
> variation of both A and B, or of only one of them while the other  
> changes in a slow sawtooth, or something else that will show the  
> different hysteresis effects at different values of Wab and Wba.

```
Here's the system with just a change in the frequency (period). I

```

note that some of the time both A and B are 1. Is that as expected?

```
![npdpmmnbjdhegcpo.png|652x695](upload://avqK4jtfT2o2G5lKg48R5p6RvJC.png)

Regards,

Rupert

```

> **···**
>
> [https://www.researchgate.net/publication/225324620\_Stochastic\_processes\_in\_reversing\_figure\_perception](https://www.researchgate.net/publication/225324620_Stochastic_processes_in_reversing_figure_perception)

---

<div class="post-metadata">

**Author:** ![MartinT](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@MartinT](http://discourse.iapct.org/u/MartinT)\
**Post date:** [November 4, 2017, 3:40am UTC](http://discourse.iapct.org/t/flip-flop/4454/8 "2017-11-04T03:40:46Z")

</div>

[Martin Taylor 2017.10.29.12.58]

```
You are right that modelling helps get things correct. Your results

```

have been puzzling me, so I checked my memory of what I learned so  
long ago against Wikipedia’s presentation of flip-flops, with rather  
salutary results. I have been mixing two different forms of  
flip-flop, analogue and digital and telling you to produce something  
that was neither. That’s not helpful. So let’s walk through it  
properly, avoiding reliance on my obviously faulty memory.

```
In the flip-flop described in the Wikipedia article, the equivalent

```

of PCT perceptual functions are logic circuits that take inputs that  
are 1 or 0 and produce outputs that are 1 or 0. It’s binary all the  
way. The flip-flop that I argue creates categories is not like that.  
It can take as input and produce as output any analogue value  
whatever. The flip-flop behaviour whose strength varies from a  
slight contrast enhancement to discrete A or B but not both as a  
function of some other “modulator” variable (e.g. task stress,  
context…) can be represented as a simple cusp catastrophe:

```
![cusp A-H2.jpg|712x413](upload://tMIca5ACWkEJ78oMjBCWyDDz0v4.jpeg)

A linear system cannot create such a cusp catastrophe, and I have

```

been proposing to you a linear system in which the perceptions are  
linear functions (sums) of their inputs and the cross-links are  
simple multipliers. However, since Weber and Fechner in the mid-19th  
century it has been taken for granted that most perceptions are  
approximations to logarithmic functions of their inputs rather than  
being linear, meaning in our context that the firing rate of a  
perceptual output approximates the logarithm of a linear function of  
the inputs.

```
Would changing your "A" and "B" functions to log(Aness + Wba*B) and

```

log(Bness + Wba_A) produce the cusp as the W multipliers decrease  
from zero to become increasingly negative? The analysis below  
suggests that it might. Obviously, the log cannot be a true  
logarithm, because firing rates cannot go below zero, so one would  
have to use an approximation to log(X) that does not go below zero  
when X \<1. Since neither the X-ness nor the A and B outputs can  
go below zero, a suitable approximation might be A = log(1+min(0,  
Aness+Wba_B)). Since Wba\*B is the inhibitory influence on the A  
perceptual function, its value may be considerably negative, but it  
can’t reduce the output below zero, and log(1+X) becomes ever closer  
to log(X) as X grows large.

```
To see whether this nonlinearity will produce the cusp catastrophe,

```

we could simulate the operation of the circuit or we could analyze.  
I trust you to do the simulation, while here I do an informal  
analysis. The equations are hard to solve explicitly, so the  
analysis is in terms of limits and directions of influence.

```
Let us look for equilibrium states for A and B, given values of

```

Aness and Bness, There should be one equilibrium condition if  
Wab\*Wba is less than a critical value (the analysis below suggests  
that this critical value is 1.0) and three if the product exceeds  
the critical value. If we make the situation symmetrical by setting  
Wab=Wba, we expect one of the equilibrium states to be where A=0,  
another where B=0, and a third where A=B. If these turn out to be  
equilibrium states, we then have to ask whether they are stable,  
metastable, or unstable. If the first two are stable and the third  
unstable, all that remains is to determine whether there might be  
other equilibria in the dynamic.

```
If A=0, then Wab*A =0, B=log(1+Bness). Wba*B = Wba*log(1+Bness), the

```

amount of inhibition of A. Because A = 0, we know that Aness \<  
-Wba_log(1+Bness). So long as this last inequality holds, A=0,  
B=log(1+Bness). We know that this equilibrium is at least  
metastable, because it holds for all Aness values less than  
-Wba_log(1+Bness). Arguing from symmetry, the other equality B=0, A  
= log(1+Aness) is also at least metastable.

```
But what about A=B? Is that an equilibrium state? It certainly is if

```

both are zero, which could happen only if Aness and Bness are both  
zero. So let’s assume that both are greater than zero, and equal,  
because if they are not equal, neither will be A and B.

```
A = log(1+min(0,Aness+Wba*B)).

By assumption, B=A > 0, so A = log(1+min(0, Aness+Wba*A) =

```

log(1+Aness+Wba\*A) \>0

```
Exponentiating both sides,

e<sup>A</sup> = 1+ Aness +Wba*A

The RHS of this equation grows linearly with A, while the LHS grows

```

exponentially, …

```
![LinearExp.jpg|781x528](upload://wQ90i3eC0KNSugpNPfN9BLvAUgz.jpeg)(Wba=2, Aness = 2)

... and since for A=0 and Aness>0 the LHS is less than the RHS,

```

there exists for all values of Wba and Aness a value of A for which  
the equation holds (LHS=RHS), and the symmetrical expression in B  
also holds. So A=B is an equilibrium state. Is it stable? To test  
this, we augment Aness by ∂Aness, without changing Bness.

```
e<sup>A</sup> = 1+ Aness + ∂Aness +Wba*A

To equate the two sides of the equation, e<sup>A</sup> must

```

increase, meaning that A must increase. What about B? We can no  
longer argue from symmetry, so we must examine its corresponding  
expression directly.

```
B = log(1+min(0,Bness+Wab*A). We still know that B >0 (indeed,

```

before we added ∂Aness, B=A), so we can forget the “min” expression  
and exponentiate as before.

```
e<sup>B</sup> = 1 + Bness + Wab*A

When Aness = Bness, A = B, but now A is greater than it was, so e<sup>B</sup>
is decreased (Wab and Wba are both negative) and so is B. The

```

reduction in B reduces the inhibition on A, increasing A and further  
decreasing B because of the increased inhibition. The A=B  
equilibrium is unstable unless Wab = Wba = 0 (the two sides are  
unconnected), but there may be a nearby equilibrium value if the  
added increase in A is less than ∂Aness, implying a loop gain less  
than 1.0.

```
The loop gain consists of the product of four components, Wab, Wba,

```

and the derivatives of the perceptual function outputs as a function  
of their inputs. Our perceptual functions are “output =  
log(1+input)”, for which the derivative is 1/(1+input), so long as  
the input is greater than zero. The maximum loop gain occurs where  
the total input to a perceptual function (say Aness+Wba_B) is just  
above zero, where the gain is just under 1.0. The critical point  
where the overall loop gain crosses 1.0 therefore occurs when  
Wab_Wba ≈ 1. For Wab_Wba \>1, there are the three equilibrium  
states mentioned earlier, whereas for Wab_Wba\<1 there is only  
one, near A=Aness, B= Bness for low values of the product,  
exaggerating the contrast more and more as the product increases,  
until as it increases beyond 1, the steepness of the contrast at A≈B  
overlaps and the single equilibrium surface becomes the fold.

```
![bkcfefhmkjjilgga.jpg|279x201](upload://fQz9rAeZIcs0dHcM1wEVJDxHkY0.jpeg) (Modulator

```

is Wab\*Wba in this case, Data is Aness-Bness)

```
That is an argument from boundary conditions and qualitative

```

effects. I hope you are able to simulate it and that the simulation  
bears out the analysis. If we could have an explicit solution to the  
equation eA = 1+ Aness +Wba\*A, it would be possible to  
provide a proper explicit equilibrium analysis of the loop and have  
no doubt.

```
Sorry for having in my senility led you astray earlier. I hope I'm

```

not doing that now.

```
Martin
```

---

<div class="post-metadata">

**Author:** ![rupert](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rupert](http://discourse.iapct.org/u/rupert)\
**Post date:** [November 16, 2017, 10:39am UTC](http://discourse.iapct.org/t/flip-flop/4454/9 "2017-11-16T10:39:17Z")

</div>

[From Rupert Young (2017.11.16 10.40)]

(Martin Taylor 2017.10.29.12.58]

> Would changing your "A" and "B" functions to log(Aness + Wba\*B) and log(Bness + Wba\*A) produce the cusp as the W multipliers decrease from zero to become increasingly negative?

It's percolating its way up my to-do list.

Rupert

---

<div class="post-metadata">

**Author:** ![MartinT](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@MartinT](http://discourse.iapct.org/u/MartinT)\
**Post date:** [November 16, 2017, 3:33pm UTC](http://discourse.iapct.org/t/flip-flop/4454/10 "2017-11-16T15:33:41Z")

</div>

[Martin Taylor 2017.11.16.10.28]

> [From Rupert Young (2017.11.16 10.40)]
> 
> (Martin Taylor 2017.10.29.12.58]
> 
> > Would changing your "A" and "B" functions to log(Aness + Wba\*B) and log(Bness + Wba\*A) produce the cusp as the W multipliers decrease from zero to become increasingly negative?
> 
> It's percolating its way up my to-do list.
> 
> Rupert

I've been using it as a tool to learn how to do more with Excel than just simple calculations. I haven't so far figured out how to do looping calculations as though they were subroutines rather than having big long lists of hundreds of iterations (samples), but I assume there is a way. For this problem, my first stab forgot that because we are analyzing the behaviour of a feedback loop, we have to have time-binding to prevent a single event reverberating independently of another that happened one iteration later. But it will come...I hope.

Martin

---

<div class="post-metadata">

**Author:** ![MartinT](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@MartinT](http://discourse.iapct.org/u/MartinT)\
**Post date:** [November 23, 2017, 4:35pm UTC](http://discourse.iapct.org/t/flip-flop/4454/11 "2017-11-23T16:35:15Z")

</div>

[Martin Taylor 2017.11.23.11.30]

> [From Rupert Young (2017.11.16 10.40)]
> 
> (Martin Taylor 2017.10.29.12.58]
> 
> > Would changing your "A" and "B" functions to log(Aness + Wba\*B) and  
> > log(Bness + Wba\*A) produce the cusp as the W multipliers decrease  
> > from zero to become increasingly negative?
> 
> It's percolating its way up my to-do list.

Rupert,

Here's a spreadsheet that implements a two-way flip-flop. It's not very  
elegant, and it may be buggy, but it seems to work. I expect you could  
easily improve on it in various ways, or make a one-way one (i.e. with  
values never below zero).

Martin

[flipflop.xlsx](http://discourse.iapct.org/uploads/short-url/cZk6Yh3zB5nNoh6trfPy9Fp3B7p.xlsx) (346 KB)

---

<div class="post-metadata">

**Author:** ![rupert](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rupert](http://discourse.iapct.org/u/rupert)\
**Post date:** [December 19, 2017, 4:05pm UTC](http://discourse.iapct.org/t/flip-flop/4454/12 "2017-12-19T16:05:06Z")

</div>

[From Rupert Young (2017.12.19 16.05)]

(Martin Taylor 2017.11.23.11.30]

> Here's a spreadsheet that implements a two-way flip-flop. It's not very elegant, and it may be buggy, but it seems to work. I expect you could easily improve on it in various ways, or make a one-way one (i.e. with values never below zero).

This appears to show a B output of \> 1 even though B input is zero. In that case shouldn't B output always be zero?

How does this work if B input is not zero, and has a different phase to A, and sometimes A=B? For the latter shouldn't only one output be non-zero?

Rupert

---

<div class="post-metadata">

**Author:** ![MartinT](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@MartinT](http://discourse.iapct.org/u/MartinT)\
**Post date:** [December 19, 2017, 5:36pm UTC](http://discourse.iapct.org/t/flip-flop/4454/13 "2017-12-19T17:36:34Z")

</div>

[Martin Taylor 2017.12.19.12.01]

> [From Rupert Young (2017.12.19 16.05)]
> 
> (Martin Taylor 2017.11.23.11.30]
> 
> > Here's a spreadsheet that implements a two-way flip-flop. It's not very elegant, and it may be buggy, but it seems to work. I expect you could easily improve on it in various ways, or make a one-way one (i.e. with values never below zero).
> 
> This appears to show a B output of \> 1 even though B input is zero. In that case shouldn't B output always be zero?

No. You have two inputs into each perceiver, the input from below (which I call the "input") and the feedback input from the other output. So long as the feedback input is strong enough, it doesn't matter what the input from below does, the flip-flop will maintain the same output high and the other zero. If Aout has been high, it will stay high until Bin-Ain\>some threshold. At least that's what it is supposed to do, if my spreadsheet programming is correct, which is far from guaranteed.

A digital flip-flop always has one high and one low value, even if both inputs are zero. In a simulation of an analogue flip-flop (which this spreadsheet is), the {0, 0} output state with {0, 0} inputs is an unstable equilibrium. Any slight noise sets off the positive feedback loop, which has a gain greater than unity. As the "high" output increases, the loop gain decreases, until the system stabilizes at a set of values for which the loop gain is +1.0. This happens because the change of output for a unit change of input decreases as the input value increases.

> How does this work if B input is not zero, and has a different phase to A, and sometimes A=B? For the latter shouldn't only one output be non-zero?

Yes, except for the transition period while the flip is flopping. When A=B, whichever one was previously high stays high until the imbalance of the inputs is sufficient to overwhelm the cross-feedback loop effect, Then you have several samples of a transient condition (in the analogue system that could be pico-seconds, seconds, minutes, or years) while both are non-zero until the flop is complete. In the spreadsheet, I used a leaky integrator to smooth the transient. Without looking back at the spreadsheet, I forget the leak rate, but it had to have a time-constant of several samples.

===========Comment========

If one views the two outputs of a flip-flop as representing the only perceptual possibilities, there is no "none of the above" possibility, unless the input circuitry is such that you either have "A" or explicitly nothing. For use as a category-level perceiver, you need either an output that goes high by default when none of the others has enough input, or you have to have a way of inhibiting all the outputs when "none of the above" is appropriate, An example of the former might be encapsulated by "All cats are grey at night", when there aren't enough photons to allow different colours to be distinguished. "Grey" is a sort of "none of the above" colour.

Martin

---

<div class="post-metadata">

**Author:** ![rupert](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rupert](http://discourse.iapct.org/u/rupert)\
**Post date:** [December 20, 2017, 6:15pm UTC](http://discourse.iapct.org/t/flip-flop/4454/14 "2017-12-20T18:15:59Z")

</div>

[From Rupert Young (2017.12.20 18.15)]

```
(Martin Taylor 2017.12.19.12.01]

```

> > ```
> > [From Rupert Young (2017.12.19 16.05)]
> > 
> > (Martin Taylor 2017.11.23.11.30]
> > 
> > ```
> > 
> > > ```
> > > Here's a spreadsheet that implements a
> > > 
> > > ```
> > > 
> > > two-way flip-flop. It’s not very elegant, and it may be buggy,  
> > > but it seems to work. I expect you could easily improve on it  
> > > in various ways, or make a one-way one (i.e. with values never  
> > > below zero).
> > 
> > ```
> > This appears to show a B output of > 1 even though B input is
> > 
> > ```
> > 
> > zero. In that case shouldn’t B output always be zero?
> 
> ```
> No. You have two inputs into each perceiver, the input from below
> 
> ```
> 
> (which I call the “input”) and the feedback input from the other  
> output. So long as the feedback input is strong enough, it doesn’t  
> matter what the input from below does, the flip-flop will maintain  
> the same output high and the other zero. If Aout has been high, it  
> will stay high until Bin-Ain\>some threshold. At least that’s  
> what it is supposed to do, if my spreadsheet programming is  
> correct, which is far from guaranteed.

```
Well, it seems strange that even though Bin is zero this would

```

provide a category of B. Are you sure that is what it is supposed to  
do?

```
Here's my replication of your spreadsheet model. Initially B is

```

suppressed such that it is -ve. Initially A is +ve, but when it goes  
-ve it then increases Bsum due to the -ve weight. Perhaps Bsum  
should not go above zero if Bin is zero?

```
![fjjijneepcihcknf.png|1392x900](upload://x2TkA2Nh1ats6ax4BJyGBluC3LK.png)

```

> > ```
> > How does this work if B input is not zero,
> > 
> > ```
> > 
> > and has a different phase to A, and sometimes A=B? For the  
> > latter shouldn’t only one output be non-zero?
> 
> ```
> Yes, except for the transition period while the flip is flopping.
> 
> ```
> 
> When A=B, whichever one was previously high stays high until the  
> imbalance of the inputs is sufficient to overwhelm the  
> cross-feedback loop effect, Then you have several samples of a  
> transient condition (in the analogue system that could be  
> pico-seconds, seconds, minutes, or years) while both are non-zero  
> until the flop is complete. In the spreadsheet, I used a leaky  
> integrator to smooth the transient. Without looking back at the  
> spreadsheet, I forget the leak rate, but it had to have a  
> time-constant of several samples.

```
That's not what I am finding here. B has the same value as A, albeit

```

briefly.

```
![njnmaeeoekkpfmok.png|1392x900](upload://zM3CYMhTFbqdlZo5NyTK3PluqY9.png)

In practice the model doesn't appear to be as straightforward as the

```

theory would seem to suggest, so I don’t think I can spare any more  
time on this myself. However, if you are able to revisit the model  
I’d be very interested to see that it can work.

```
Rupert

```

---

<div class="post-metadata">

**Author:** ![MartinT](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@MartinT](http://discourse.iapct.org/u/MartinT)\
**Post date:** [December 20, 2017, 7:10pm UTC](http://discourse.iapct.org/t/flip-flop/4454/15 "2017-12-20T19:10:04Z")

</div>

[Martin Taylor 2017.12.20.13.29]

> [From Rupert Young (2017.12.20 18.15)]

> (Martin Taylor 2017.12.19.12.01]
> 
> > > [From Rupert Young (2017.12.19 16.05)]
> > > 
> > > ```
> > > (Martin Taylor 2017.11.23.11.30]
> > > 
> > > ```
> > > 
> > > > ```
> > > > Here's a spreadsheet that implements a
> > > > 
> > > > ```
> > > > 
> > > > two-way flip-flop. It’s not very elegant, and it may be  
> > > > buggy, but it seems to work. I expect you could easily  
> > > > improve on it in various ways, or make a one-way one (i.e.  
> > > > with values never below zero).
> > > 
> > > ```
> > > This appears to show a B output of > 1 even though B input
> > > 
> > > ```
> > > 
> > > is zero. In that case shouldn’t B output always be zero?
> > 
> > ```
> > No. You have two inputs into each perceiver, the input from
> > 
> > ```
> > 
> > below (which I call the “input”) and the feedback input from the  
> > other output. So long as the feedback input is strong enough, it  
> > doesn’t matter what the input from below does, the flip-flop  
> > will maintain the same output high and the other zero. If Aout  
> > has been high, it will stay high until Bin-Ain\>some  
> > threshold. At least that’s what it is supposed to do, if my  
> > spreadsheet programming is correct, which is far from  
> > guaranteed.
> 
> ```
> Well, it seems strange that even though Bin is zero this would
> 
> ```
> 
> provide a category of B. Are you sure that is what it is supposed  
> to do?

```
It is exactly what a flip-flop is supposed to do. I explained in my

```

previous message why the simple flip-flop is unlikely to be what you  
want as a category recognizer. It is a category discriminator,  
without a third “none-of-the-above” output. In words, it is 100%  
certain that either A or B is true but not both, and the question is  
which one it is. If Bout is positive when Bin is zero, that is  
because Bin is greater than Ain, or if at this moment it is not, it  
has been up to now and the excess of Ain is as yet insufficient to  
say that things have changed.

> ```
> Here's my replication of your spreadsheet model. Initially B is
> 
> ```
> 
> suppressed such that it is -ve. Initially A is +ve, but when it  
> goes -ve it then increases Bsum due to the -ve weight. Perhaps  
> Bsum should not go above zero if Bin is zero?

```
No. That is exactly what it is supposed to do.

```

> ![fjjijneepcihcknf.png](http://discourse.iapct.org/uploads/default/original/1X/e79b718ceb72bbbc55f29f522e0117b062614cec.png)
> 
> > > ```
> > > How does this work if B input is not
> > > 
> > > ```
> > > 
> > > zero, and has a different phase to A, and sometimes A=B? For  
> > > the latter shouldn’t only one output be non-zero?
> > 
> > ```
> > Yes, except for the transition period while the flip is
> > 
> > ```
> > 
> > flopping. When A=B, whichever one was previously high stays high  
> > until the imbalance of the inputs is sufficient to overwhelm the  
> > cross-feedback loop effect, Then you have several samples of a  
> > transient condition (in the analogue system that could be  
> > pico-seconds, seconds, minutes, or years) while both are  
> > non-zero until the flop is complete. In the spreadsheet, I used  
> > a leaky integrator to smooth the transient. Without looking back  
> > at the spreadsheet, I forget the leak rate, but it had to have a  
> > time-constant of several samples.
> 
> ```
> That's not what I am finding here. B has the same value as A,
> 
> ```
> 
> albeit briefly.

```
Your diagrams show that it is what you find in your replication,

```

exactly what I said. During the transition period, both are briefly  
positive, and there has to be a moment when both have the same  
positive value.

> ```
> ![njnmaeeoekkpfmok.png|1392x900](upload://zM3CYMhTFbqdlZo5NyTK3PluqY9.png)
> 
> In practice the model doesn't appear to be as straightforward as
> 
> ```
> 
> the theory would seem to suggest,

```
Well, so far, it seems to be working in a very straightforward

```

manner as the theory says it should. What problem do you still see?

```
Do you want me to produce a polyflop demo instead? I was going to do

```

that, but I have to figure out how to program something like  
subroutines in Excel so I don’t have to deal with thousands of lines  
of the data for each sample moment and can simply produce graphs for  
the inputs and outputs. Probably Excel isn’t the best language to  
use, but I just wanted to show something quick and dirty that works  
as intended. I can’t spend much time on programming a polyflop, as I  
am spending most my time on PPC. A proper polyflop simulation  
probably needs a parallel programming structure anyway, and that’s a  
bit beyond me. Maybe a randomized order of updating per sample would  
do. I don’t know, but it could be worth a try.

> ```
> so I don't think I can spare any more time on this myself.
> 
> ```
> 
> However, if you are able to revisit the model I’d be very  
> interested to see that it can work.

```
You have that now. I suspect that the problem is that you were

```

looking for a circuit that is supposed to do something different.  
You want to suppress the category output if there’s no analogue  
variable to be categorized. If the flip-flop discriminates between  
“Lion” and “Tiger” you want it to be inhibited if the analogue  
perception of both are less than some threshold. It shouldn’t be too  
hard to add an inhibitory connection based on the sum of Ain and  
Bin. You might want to do that in a practical robot, but it’s simple  
enough that I don’t think it’s worth doing as an addition to this  
working simulation. However, as always I may change my mind  
tomorrow.

```
Martin

```

> **···**
>
> > ```
> > Rupert
> > 
> > ```

---

<div class="post-metadata">

**Author:** ![rupert](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rupert](http://discourse.iapct.org/u/rupert)\
**Post date:** [December 21, 2017, 11:29am UTC](http://discourse.iapct.org/t/flip-flop/4454/16 "2017-12-21T11:29:05Z")

</div>

[From Rupert Young (2017.12.21 11.30)]

(Martin Taylor 2017.12.20.13.29]

> > [From Rupert Young (2017.12.20 18.15)]

> > (Martin Taylor 2017.12.19.12.01]
> > 
> > > > ```
> > > > [From Rupert Young (2017.12.19 16.05)]
> > > > 
> > > > (Martin Taylor 2017.11.23.11.30]
> > > > 
> > > > ```
> > > > 
> > > > > ```
> > > > > Here's a spreadsheet that implements
> > > > > 
> > > > > ```
> > > > > 
> > > > > a two-way flip-flop. It’s not very elegant, and it may be  
> > > > > buggy, but it seems to work. I expect you could easily  
> > > > > improve on it in various ways, or make a one-way one (i.e.  
> > > > > with values never below zero).
> > > > 
> > > > ```
> > > > This appears to show a B output of > 1 even though B
> > > > 
> > > > ```
> > > > 
> > > > input is zero. In that case shouldn’t B output always be  
> > > > zero?
> > > 
> > > ```
> > > No. You have two inputs into each perceiver, the input from
> > > 
> > > ```
> > > 
> > > below (which I call the “input”) and the feedback input from  
> > > the other output. So long as the feedback input is strong  
> > > enough, it doesn’t matter what the input from below does, the  
> > > flip-flop will maintain the same output high and the other  
> > > zero. If Aout has been high, it will stay high until  
> > > Bin-Ain\>some threshold. At least that’s what it is supposed  
> > > to do, if my spreadsheet programming is correct, which is far  
> > > from guaranteed.
> > 
> > ```
> > Well, it seems strange that even though Bin is zero this would
> > 
> > ```
> > 
> > provide a category of B. Are you sure that is what it is  
> > supposed to do?
> 
> ```
> It is exactly what a flip-flop is supposed to do. I explained in
> 
> ```
> 
> my previous message why the simple flip-flop is unlikely to be  
> what you want as a category recognizer. It is a category  
> discriminator, without a third “none-of-the-above” output. In  
> words, it is 100% certain that either A or B is true but not both,  
> and the question is which one it is. If Bout is positive when Bin  
> is zero, that is because Bin is greater than Ain, or if at this  
> moment it is not, it has been up to now and the excess of Ain is  
> as yet insufficient to say that things have changed.

```
Oh ok, looks like I've been working under some false assumptions.

```

> > ```
> > That's not what I am finding here. B has the same value as A,
> > 
> > ```
> > 
> > albeit briefly.
> 
> ```
> Your diagrams show that it is what you find in your replication,
> 
> ```
> 
> exactly what I said. During the transition period, both are  
> briefly positive, and there has to be a moment when both have the  
> same positive value.

> > ```
> > ![njnmaeeoekkpfmok.png|1392x900](upload://zM3CYMhTFbqdlZo5NyTK3PluqY9.png)
> > 
> > ```

```
Ok. I was expecting that the outputs would swap over, with A briefly

```

being zero (or low). I thought you were agreeing with me. However, A  
remains high meaning both are “recognised”; I was expecting just one  
to dominate. Maybe if Bness was more persistent then they would swap  
over.

```
Maybe I'll revisit this at some future point, but for now I want to

```

get going on my projects for learning, and autonomous vehicles!

> ```
> Do
> 
> ```
> 
> you want me to produce a polyflop demo instead? I was going to do  
> that, but I have to figure out how to program something like  
> subroutines in Excel so I don’t have to deal with thousands of  
> lines of the data for each sample moment and can simply produce  
> graphs for the inputs and outputs. Probably Excel isn’t the best  
> language to use, but I just wanted to show something quick and  
> dirty that works as intended. I can’t spend much time on  
> programming a polyflop, as I am spending most my time on PPC. A  
> proper polyflop simulation probably needs a parallel programming  
> structure anyway, and that’s a bit beyond me. Maybe a randomized  
> order of updating per sample would do. I don’t know, but it could  
> be worth a try.

```
Well, you're welcome to try out the PCT configuration and execution

```

environment I have developed. Instead of programming you configure  
systems graphically, as attached, and during execution you can see  
live updates of all data values as well as select dynamic plots of  
data signals (as above). You can change parameters live, and also  
direct output to a spreadsheet file. I could do with a guinea pig 🙂

> ```
> I
> 
> ```
> 
> suspect that the problem is that you were looking for a circuit  
> that is supposed to do something different.

```
Yes probably. Worth revisiting as some point to test with other

```

variations and types of signals for inputs.

```
Regards,

Rupert

```

[CategoryTriangleLog.pdf](http://discourse.iapct.org/uploads/short-url/egyn3RG1M6Sh0exhpaAw3S7IK5o.pdf) (20.7 KB)

---

<div class="post-metadata">

**Author:** ![MartinT](http://discourse.iapct.org/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@MartinT](http://discourse.iapct.org/u/MartinT)\
**Post date:** [December 24, 2017, 6:42pm UTC](http://discourse.iapct.org/t/flip-flop/4454/17 "2017-12-24T18:42:33Z")

</div>

[Martin Taylor 2017.12.24.13.41]

> [From Rupert Young (2017.12.21 11.30)]
> 
> Well, you're welcome to try out the PCT configuration and execution environment I have developed.

How might I do that?

Martin
