►
From YouTube: BHTMS: Active Duty Cycle Period Calculations
Description
We need to add a period to the current active duty cycles as well as implementing overlap duty cycles.
A
A
B
B
B
A
A
A
That's
really
odd
I,
don't
have
any
other
Chrome
page
up.
It's
gonna,
give
it
a
minute
and
see
if
there's
see
if
there's
another
echo
issue,
I
still
don't
understand
what
just
happened.
It
happened
twice
after
I
shut
down
all
my
chrome
windows,
but
I
think
it's
okay.
Now,
okay,
so
I'm
gonna
turn
my
desktop
audio
back
on
turn
the
music
stream
back
on
alright
very
carefully
very
carefully
turning
things
back
on,
okay,
I
think
we're
past
the
I
think
we're
past
inception.
A
A
And
I
looked
up
a
new
pic
how
they
did
at
duty
cycles
and
it
was
better
than
the
way
I
did
it
and
that
I
don't
have
to
keep
a
count
of
how
many
time
steps
and
it
includes
a
period
there
I
noticed
there's
a
there's
a
longer
than
normal
delay.
I,
don't
know
what
to
do
about
that.
I
have
everything
set
as
far
as
I
can
tell.
A
Let
me
check
by
ingestion
settings
I've
got
it
set
for
as
far
as
I
can
tell
the
quickest
feedback
that
I
can
get
sometimes
there's
just
a
long
delay.
I,
don't
know
what
to
do
about
that,
so
it
will
be
what
it
is.
It
is
what
it
is,
which
is
the
most
tautological
statement.
You
can
say:
here's
what
it
is,
which
means
nothing.
A
A
Duty
cycles,
is
you
guys
know
what
active
duty
cycles
are?
Do
I
need
to
do?
I
need
to
go
over
active
duty
cycles.
Cuz
I'd
be
happy
to
very
simply
I'm
I'm
keeping
track
of
it
as
a
percentage
over
time.
As
long
as
we've
seen
a
mini
convoy
from
a
mini
column
standpoint.
How
active
has
this
been
as
a
percentage,
so
20
percent
there's
a
hundred
time
steps
if
the
answer
is
20
percent?
That
means
that
mini
column
has
been
activated
20
times
out
of
the
last
hundred
out
of
the
hundred
time
steps.
A
So
that's
sort
of
a
simple
way
of
doing
it
and
we're
calculating
that
once
for
each
mini
column
and
we're
going
to
try
and
do
that
a
little
bit
better
here.
So
the
current
way
that
we
have
been
doing
it
is
this
way,
so
I
am
keeping
a
count
of
how
many
compute
cycles
we've
seen.
So
every
time
we
can
compute,
we
increment
that
account.
We
create
an
output
array
and
that's
one
for
each
mini
column
and
then
for
each
mini
column.
A
Essentially,
we
giving
it
an
index
of
winners,
the
indices
of
the
mini
columns
that
won
the
last
competition
and
then
we're
just
going
to
check
if
this
one
one
we're
going
to
increment
that
count
and
then
because
so
we've
got
to
sort
of
things
here.
We've
got
this
output
array,
which
is
a
percent,
and
then
the
active
duty
adc's
index
by
the
mini
columns
index,
which
is
a
count.
B
A
The
past
hour
of
over
compute
count
essentially-
and
this
is
the
average.
So
this
is
how
many
times
it's
been
active
over
how
many
computes
we've
actually
done,
and
that's
that's
the
poor,
poor
person's
way
of
doing
the
active
duty
cycle
now
that's
different
from
the
overlap
duty
cycle.
So
let's
take
a
quick
look
at
that.
Oh
I
I
shut
chrome
down
out
of
panic
because
of
the
audio
inception
that
I
had
earlier.
So
let
me
just
bring
it
back
up.
Dang,
okay,
history.
A
A
A
Little
bit
of
beat
in
the
background,
but
not
too
much
so
the
overlap
duty
cycle
is
a
they're.
Both
moving
averages,
both
moving
average
moving
average
overlap,
is
a
number
of
inputs
and
they're
and
they're
also
both
indexed
by
the
mini
column
index.
So
for
each
mini
column,
we'll
have
an
overlap,
duty
cycle
and
an
active
duty
cycle.
So
far,
we've
only
done
the
active
one,
so
the
active
one
is
the
frequency
of
activation,
which
is
the
count
essentially
a
count
of
how
many
times
it's
been
active
over
the
period.
A
A
A
A
A
A
Okay,
so
this
is
our
way
of
doing
it.
The
way
we're
going
to
do
is
not
going
to
be
too
much
different,
but
we're
going
to
abstract
away
a
function.
It's
a
very
similar
to
the
way
nupoc
does
it.
It
has
a
helper
that
updates
duty
cycles,
all
it
needs,
and
in
this
case
you
can
clearly
see
that
when
this
is
called
it's
given
a
the
the
active
columns
which
are
the
winners
right,
the
winter
columns,
and
we
can
assume
that
this
active
column.
A
If
we
look
at
how
it
is
used,
it's
a
this
is
Python,
and
this
is
numpy
numpy
and
don't
be
whatever
you
want
to
call
it
hello,
hello,
hello,
David,
Duckworth,
the
Leona,
Duckworth's
husband,
good,
to
see
you
I
guess
we
could
still,
even
if
you're,
using
your
wife's
YouTube,
we
could
still
do
this
live
share
things.
Let's
do
that
sign-in
to
do
this
every
once
in
a
while.
Okay,
however,
good
did
it
work,
it
worked
copy.
A
We'll
do
that
too,
but
we're
gonna
start
with
the
non
graphical
stuff
and
we're
going
to
clean
up
our
active
duty
cycles,
implementation
and
add
an
overlap,
duty
cycles,
implementation
as
well
and
then
we're
gonna
go,
add
graphics
for
it,
so
I'm
hoping
I
have
to
be
done,
3:30
at
the
latest,
so
I'm
hoping
we
get
all
that
done
and
if
so,
there's
other
things.
I
want
to
do
too.
So
so,
without
further
ado,
let's
get
let's
get
to
this.
Let's,
let's
first
I
want
to
review
this
code.
A
little
bit
closer.
A
So
when
this
is
called
went
up
to
update
duty
cycles
is
called
its
Givens
an
overlap.
So,
let's,
let's
look
at
see
where
it's
wait?
That's
not
the
function.
I
want
I
want
this
one.
This
is
in
the
nupoc
code
base.
There
we
go
so
it's
given
overlaps
and
I
know
what
this
overlaps
is.
An
active
columns.
Okay
I
just
wanted
to
make
sure.
A
So
what
we
get
here
when
we
call
this
this
overlaps
is
an
array
indexed
by
mini
column
index
and
the
active
columns
is
a
I
hate,
calling
this
a
dense
array,
but
it's
an
array
of
indices,
so
I
think
this
overlaps
is
an
array
indexed
by
mini
column
index
and
this
so
we're
going
to
have
empties.
You
know
we're
going
to
have
one
for
each
mini
column
and
the
act
of
columns
is
not
one
for
each
mini
column.
It's
just
a
list
of
the
winter
column
indices.
A
B
A
Of
columns
is
an
array
containing
the
indices
of
the
active
columns,
so
what
we
get
here
is
they're
going
to
create
an
overlap
array
which
we
and
is
for
the
number
of
columns.
This
is
just
numpy,
speak
for
zeroing
out
an
array
creating
an
empty
array
full
of
zeros,
essentially
for
each
column,
same
thing
for
that
so
they're,
creating
these
intermediary
arrays
and
then
they're
filling
them
with
ones
properly.
A
So
this
overlap
array
is
essentially
putting
in
ones
wherever
there
is
any
overlap,
that's
what
this
is,
and
this
active
array
is
filling
in
ones
wherever
just
for
the
winter
column.
So
so
this
is
like
a
one
in
zero
array
of
active
columns
and
overlaps.
Okay,
so
the
period
is
something
we
haven't
set
yet
right
now,
the
period
for
me
is
equivalent
to
flip
some
in
their
own
function.
Compute
count,
so
we
want
to
implement.
A
Jeffrey
I
was
thinking
about
your
question
there.
If
it
depends
on
what
code
base
you're
in,
if
you're
in
new
pick
C++,
they
use,
they
do
not
have
an
SDR
class,
they
use
primitive
data
structures
for
STRs,
and
if
you
go
to
the
HTM
that
core
community
Fork
of
nupoc
core,
they
have
an
SDR
class
which
has
a
lot
of
helper
functions.
A
A
The
current,
so
we
create
these
duty
cycles,
active
duty
cycles
and
overlap
duty
cycles
and
basically
we're
setting
them
to
ourselves
we're
passing
in
the
let
the
last
value
and
we're
setting
the
to
the
new
value.
So
what
we
get
here,
what
we
get
back
here
is
well,
let's
go
check
it,
let's
go
look
and
here's
here's
the
function-
and
this
is
done.
A
That's
these
essentially
binary
arrays
that
were
passing
in
the
overlap
array,
an
active
array.
That's
it
once
binary
array,
so
no
dents,
no
dents
nada,
not
an
array
of
scalar
values.
Well,
1
or
0.
You
can
see
that
scalar
value,
so
we're
gonna
create
a
function.
That's
similar
to
this.
It's
exactly
it's
a
formula
for
a
running
average
and
we're
gonna.
Do
it
twice
and
we've
only
done
it
once
so
far.
We
did
it
for
active
duty
cycles.
A
A
You're
right
for
active
duty
cycles,
it's
ones
its
ones
and
zeros,
so
that
will
give
you
a
percent
something
that
uses
a
percent
which
is
really
close
to
what
I'm
doing
here.
So
I'm
creating
a
percent
here,
but
for
the
overlaps,
it's
not
between
1
and
0,
because
the
overlaps,
I'm
pretty
sure
they
don't.
They
contain
counts.
A
A
A
At
each
index,
if
oh
wait,
a
minute
overlap,
says
array
containing
the
overlap
score
for
each
column
you
or
explore
the
foreign
mini
column
is
defined
as
the
number
of
synapses
in
a
connected
state,
so
yeah.
So
we're
just
saying
if
the
overlaps
are
greater,
if
there
are
more
than
zero
overlaps,
essentially
we're
going
to
set
each
index
to
one
I.
Think.
A
You
know
I'm
a
little
confused
about
how
the
overlaps
is
going
to
work,
but
let's
set
it
up,
so
the
active
duty
cycles
works
and
we'll
pull
out
like
a
helper
function,
similar
to
what
we
did
here.
That
will
do
it
so
that
we
can
call
it
twice
once
for
the
overlap
and
once
for
active
duty
cycles
so
and
let's
make
sure
that
our
tests
run
first
of
all,
I
think
I
can
go
just
run
the
current
file.
This
should
work
this
it
used
to
work.
I
have
two
tests:
okay,.
A
A
A
You
know,
okay,
this
compute
duty
cycle,
so
we
want
to
send
it
in
the
current
duty
cycles,
which
is
this
that's.
Our
current
duty
cycles
are
always
waiting
the
previous
average
by
t
minus
one
divided
by
T
and
the
newest
values
by
one
over
T
yeah,
but
I
think
that
makes
sense.
The
new
input
is
going
to
be
the
winners,
but
it's
not
because
I
have
to
do
this
zeroing
out
type
of
thing,
so
Const.
A
Are
these
winners
are
by
index
so
I'm
going
to
call
this?
Let's
call
it
binary
winners,
I,
don't
have
a
better
name
for
that
kind
of,
and
then
that's
when
I'm
gonna
pass
in
this
isn't
gonna
work
right
away,
I'm,
just
sort
of
setting
some
placeholders,
so
I
can
get
my
logic
right
and
then
for
the
period
we're
going
to
use
compute
count
because
I
want
to
see
the
tests
pass
before
anything
else
happens.
A
A
It
right
now
yeah
nobody
likes
nobody
likes
that
that's
much
more
much
clearer.
If
you
do
that.
Okay,
so
so
I've
already
got
this
winner
indices.
I've
already
done
this,
so
I
can
take
that
and
and
I'm.
Oh,
no,
no
wait!
A
That's
just
the
indices,
so
the
winners
map
is
not
it's
a
little
bit
more
information
that
we
need
first
I'm,
going
to
get
the
indices
and
then
I'm
going
to
and
then
I'm
going
to
loop
through
the
binary
winners.
This
is
a
little
bit
of
overkill,
I
know,
but
it's
I'm
doing
TDD.
So
we
can
always
come
back
and
clean
up
later.
So
please
don't
fault
me
for
bad
code.
A
A
So
this
is
saying
the
period
is
the
period
if
it's
greater
know,
that's
the
there.
So
it's
not
it's
not
taking
into
account
whether
it's
if
it's
very
small,
so
that's,
okay,
that's
a
good
point.
I
think
it
all
increment
pretty
quickly.
Usually
the
default
for
the
period
is
a
thousand,
so
we
don't
and-
and
we
don't,
we
don't
usually
have
the
number
of
samples.
A
A
A
A
That
so
so
this
is
all
it
is,
and
if
your
num
pay,
if
you're
using
numpy
but
we're
gonna,
have
to
do
this
for
each
of
any
columns.
This
is
like
don't
be
magic
that
that
returns.
An
array,
because
duty
cycles
is
an
array.
New
input
is
an
array.
I.
Think
of
the
new
input
is
an
array
of
the
same
type.
So
so
we're
gonna
have
to
do
this
per
there's.
No
JavaScript
magic.
It's
for
us
to
do
this
so
we're
gonna.
A
A
A
B
A
B
A
All
right:
well,
let's,
let's
cross
our
fingers
and
run
the
test,
see
what
happens.
No
type
error
assignment,
oh
yeah,
so
I've
got
a
constant
I've
got
a
constant
okay.
How
to
go
away,
go
away!
How
do
you
go
away.
A
I'm
still
getting
used
to
this
IDE,
so
I
obviously
cannot
make
this.
Have
this
bit
be
a
constant
guess?
That's
where
you
run
this
all
right,
so
our
assertion,
error,
I,
could
really
hate
the
way
this
displays
the
tests
display.
So
there's
a
problem
with
the
compute
on
third
compute,
with
first
winners.
The
active
duty
cycle
a3
should
be
2/3,
but.
A
A
A
B
B
A
A
Okay
step
in
the
compute,
he's
he's
right,
who's
right,
okay,
I'm,
not
gonna,
so
I'll
stop
right
here
and
then
go
into
the
so
that
ATC's
is
zero
currently,
which
is
correct,
and
the
binary
winners.
Good,
there's
two
winners
and
they're
compute
count
is
two
so
get
into
this
go
through
each
one
here,
so
the
duty
cycle.
So
let's
see
the
duty
cycle
at
one
period,
wanna
so
30
cycles.
Let's
go
to
zero
I'm
going
to
stop
right
here
now,
you're
both
put
in
same
thing:
okay,.
A
A
A
C
A
A
A
A
Where
is
the
test
failing
on
second
compute
with
the
same
winner?
So
so
let
me
look
through
the
tests
and
make
sure
that
I'm
and
make
sure
that
I'm
I've
got
everything
in
the
way.
I
think
it
is
so
when
there's
no
window,
these
are
all
with
no
window
sizes.
On
the
first
computation,
I'm,
basically
saying
okay,
the
first
winners
are
three
and
seven
I'm
gonna
write
this
down
the
first
winners.
You
guys
further
look
at
this
bit.
We've
got
three
and
then
hold
on
I
know.
A
A
A
Here's
my
compute
I'm
computing,
the
first
winners
and
then
for
each
winter
index.
They
should
be
one
for
art,
they
should
be
zero.
So
that's
passing
I
think
I
think
that
was
passing
now.
We've
got
two
failing
and
the
first
one
is
working.
So
it's
on
second
compute
that
we're
failing
winner
duty
cycle
F.
The
next
three
should
be
one
on
the
second
compute.
So
let's
look
at
that
one.
A
A
A
C
C
A
This
isn't
what
I
want
where
I
wanted
to
stop.
That's,
not
where
I
wanted
to
stop.
It's
the
second
one.
Okay,
so
we
just
computed
the
first
winners
for
the
second
time.
That's
the
problem,
so
three
should
be
100%
and
seven
should
be
100%,
so
we're
gonna
stop
right
here.
We're
gonna
see
what
what
we
screwed
up.
A
C
A
A
C
A
A
If
they're,
okay,
so
we're
passing
again,
the
period
is,
is
always
the
compute
count
or
the
iteration
number.
So
it's
going
to
be
always
the
amount
of
computes
that
we've
done
so
right
right
here,
I'm
iterating,
the
compute
count
before
everything
at
right
as
we
compute
the
active
duty
cycles
and
that's
what
I'm
using
is
the
essentially
the
denominator
of
the.
A
I
just
wanted
to
extract
this
function
so
that
we
could
reuse
it
for
overlap,
duty
cycles
and
have
a
way
to
inject
a
period.
If
we
want
one
so
now,
I'm
going
to
write
tests
that
specifically
set
a
period
and
make
sure
that
they
they
work:
okay,
okay,
so
the
third
compute
with
new
winner.
So
now
what
we're
going
to
do
is.
B
A
A
A
What
period
to
use
so
here's,
where
I'm
using
the
compute
count.
So
let's
pull
this
out
and
and
say
duty
cycle
period,
let's
say
period
and
then
we'll
say
period
equals
now.
This
stop
stop
duty
cycle
pier
period
or
this
compute
count
and
that's
not
going
to
work
because
it's
going
to
be
false,
II,
so
I
have
to
say
if
the
duty
cycle
period
is
not
equal,
undefined
JavaScript,
you
thing:
if
it's
not
undefined,
then
we'll,
then
we're
going
to
use
it.
A
Best
way
to
do
this
on
two
lines:
I
think
like
this,
so
if
doesn't
equal
undefined,
we
will
use
the
duty
cycle
period
and
otherwise
really
used
to
compute
count,
and
that
will
be
our
period.
This
should
still
run
and
pass.
So,
let's
test
real
quick
that
we
run
and
pass
nope
all
right,
so
I
screwed
something
up.
Let's
go
to.
B
A
All
right,
let's
get
to
where
we
calculate
the
period,
to
see
what
we
screwed
up
all
right.
Let's
go
all
the
way
here.
Okay,
this
is
our
duty
cycle
period.
Yes,
so
that's
so
we
should.
Oh
that's
the
problem.
It's
it's
not
gonna
pass
because
I
I
passed
it
the
period,
so
we're
actually
we're
feeling
the
right
test.
Okay,
so
that's
good,
that's
good!
So
let's
kill
that
I
hate
dropping
into
a
certian.
This
is
the
wrong
thing
to
do.
You
do
not
the
debugger
shouldn't
drop
into
the
assertion
class,
in
my
opinion,
yeah.
A
A
A
B
A
A
A
So
of
course
it's
gonna
I'm
only
running
this
twice
so
now
when
we
get
to
the
third
one,
so
first
computation,
first
winners.
Second
computation,
first
winners,
third
computation
with
new
runners.
So
so
what
I'd
really
want
to
do
here
is
make
sure
it's
that,
so
this
is
going
to
change
right
or
is
it?
Is
it
gonna
change
for
the
third
pump?
Oh
yeah?
So
let
me
look
back
here.
Third,
computation
is
the
new
the
second
winner,
so
the
third
computation
is
going
to
be
this
for
an
eight.
A
A
A
No
I'm,
not
okay,
so
this
this
is
the
test
that
I
have
to
change
so
after
the
third
computation.
If
my
period
is
two
which
it
is
then
I'm
gonna,
very
explicitly,
I'm
gonna
very
explicitly
do
this.
So
so
let
me,
let's
do
this
explicitly
like
I
said
I'm
even
going
to
the
you.
Might
you
might
think
this
is
ridiculous.
Okay,
but
I
don't
care
zero,
one.
Two
three,
four:
five:
six,
seven,
eight
nine
I'm
gonna
be
super
explicit
about
this.
A
B
A
A
A
A
I'll
see,
that's
not
right,
I
don't
want
the
period
to
be
the
compute
count.
That's
failing.
If
the
duty
cycle
period
is
more
than
the
curfew
count
more
than
the
compute
count
right.
That's
the
problem.
I
have
all
right.
Let's
just
try
this
again,
I
didn't
all
right
dive
in
there
all
right,
I'll
see
this
work
better.
Hopefully,.
A
A
Let's
just
say:
let
period,
let's
just
be
very
explicit
about
it
else,
area
equals
setups
duty
cycle.
If
you
count
all
right,
I'll
bet
you
this
will
work.
I
thought
this
will
work
to
rewrite
it,
damn
it
damn.
It
didn't
work,
okay,
why
the
hell
I
wish
it
I
need
to
be
able
to
tell
it
somehow
not
to
break
into
the
assertion
it
should
be
it
should
it
should
default
to
the
test.
Sir.
A
A
A
A
I
think
we're
almost
there
been
going
at
this
for
an
hour.
Hopefully
we'll
make
some
fast
progress
once
we
get.
This
foot
place,
another
assertion
error
table,
but
we're
in
the
right
place
anyway.
So
let's
look
the
ATC,
oh
I,
know
what
it
is.
Abc's
no
ABCs
I
think
I
might
have
a
problem
I
test
here,
yeah,
so
I'm
looping
through
the
ABCs.
But
that's
not
what
I
want
to
do.
I,
don't
wanna.
Do
this.
B
A
A
A
All
right,
what
am
I
coding
I
am
so
I'm
creating
and
I'm
doing
active
duty
cycle
implementation
for
a
spatial
Pooler,
and
if
you
want
to
see
exactly
what's
going
on
or
what
I'm
working
on,
let
me
show
you
real,
quick,
the
application,
spatial
cooler,
here's
the
page
that
I'm
working
on
directly
and
at
the
very
bottom
is
this
active
duty
cycles.
That's
this
is
what
I'm
working
on
the
active
duty
cycles
for
an
HTM
spatial
Pooler
for
this
document
as
a
tutorial
on
spatial
pooling,
and
so,
if
you
want
to
understand.
A
Can
read
through
this
document
building
it
out
as
we
go
a
lot
if
it's
empty
but
I'm
working
on
a
spatial
pool
or
section
right
now,
and
this
code
is
going
to
run
these
diagrams.
So
these
are
all
dynamic.
Diagrams
is
actually
running
spatial
pooling
in
the
background
and
I'm
I'm
trying
to
properly
calculate
the
active
duty
cycles
for
each
mini
column,
both
active
duty
cycles
and
overlap
duty
cycles.
A
A
A
A
A
A
A
A
B
A
C
A
A
A
So
yeah,
it's
I'm,
not
sure
if
there's
a
direct
correlation
to
active
duty
cycles
in
your
brain,
but
there's
certainly
but
there's,
but
this
is
a
way
to
enforce
homeostatic
regulation
of
neurons.
So
that's
why
we're
doing
it
we're
sort
of
doing
a
computer
science
II
thing
to
try
and
simulate
homeostatic
regulation
of
neuronal
activity
and
the
fewest
words
I
can
use.
C
A
The
last
one
were
one
and
or
we're
three
and
seven
we're
on
that's
correct.
Our
current
winners
are
four
and
eight
okay,
that's
wrong.
Kurt
winner
shouldn't
be
four
and
eight
Kurt.
Oh
yeah,
yeah
sure
this
is
the
second.
No.
This
is
the
third,
so
the
last
ones,
so
that
so
I
think
I
see
what
the
problem
is.
The
current
ADC,
where
we
have
were
right
here
we're
about
to
go
in
so
this
is
before
computing.
The
third
compute
cycle.
A
A
A
A
A
Compute
count
whoops
compute
count,
so
one
okay,
our
current
ABCs,
are
all
zero
correct.
Okay
on
the
next
one
we're
at
two
now
we
saw
three
and
seven,
which
is
right,
which
is
what
I,
which
is
what
we
expected,
and
our
next
ones
are
current.
Our
next
winners
are
should
be
four
and
eight,
and
they
are
not
okay.
So
what
happened
there.
A
A
I'm
sending
in
the
wrong
winter
indices
hold
on
hold
on.
Let
me
go
back
to
the
call
stack:
oh
right,
oh
I'm,
sending
in
the
first
where's
twice,
okay,
so,
but
in
my
test,
I
set
up
to
send
in
the
second
winners.
First
winner
is
the
second
winner.
Second,
winners,
okay,
so
here's
the
first
computation-
and
this
should
be
second
winners,
okay
and
then
on
the
third
computation.
Again,
second,
winners:
that's
that's
what
I
described
here!
A
B
A
A
A
A
A
A
C
A
A
A
A
Yeah
I'm
in
the
wrong
test.
Damn
it
I
should
have
thought
I
had
this
zipped
down
the
test.
I
want
to
jump
into
was
the
one
that
was
actually
failing,
which
I
think
was
here.
Second
compute,
the
same
winners.
No,
it's
the
first
test.
I've
got
to
Scott
feeling,
okay,
okay,
so
maybe
maybe
everything
works
now,
except
for
the
first
test
is
broke.
A
And
calculating
active
duty
with
okay
with
I'm,
not
a
moving
average
okay,
so
we
want
to
go
second
copy,
the
same
winners
and
not
a
moving
average.
Okay,
so
I
broke
something
I
broke
something
in
this
first
one
on
the
second
computation
right
here,
so
we
are
going
to
jump
in
there.
I
thought
it
was
in
the
wrong
place
it
turns
out.
That
is.
That
is
exactly
where
tests
were
failing
so
dive
in
here.
Let's
look
at
the
period.
A
A
A
A
A
Our
ABCs
should
happy
three
and
seven,
which
is
right.
So
that's
the
last
winners.
Okay,
the
period
will
be
2
because
there's
no
active
duty
cycle
period,
all
right.
So
now
we're
going
to
do
compute
the
cycle.
Here's
the
current
IDC's,
which
are
three
and
seven
here's
the
binary
winners,
which
are
four
and
eight
and
the
period
is
two
okay.
A
A
Okay,
so
4
3
30
cycles
at
3
is
currently
1
times
the
period
which
is
2
minus
1,
which
is
1.
So
it's
just
1,
plus
the
new
input,
which
is
nothing
okay,
divided
by
period
which
is
2,
so
it
should
be
1/2.
The
duty
cycle
should
be
1/2
and
it
is
1/2
if
that
makes
sense.
Ok,
ok,
let's,
let's
step
out
of
this,
let's
let's
get
right
here
and
make
sure
now
that
we've
got
our
out.
This
is
correct.
A
A
Few
counties
yeah,
that's
right!
That's
right!
That's
totally
right!
It's
my
test!
Rom
I'm,
wondering
if
my
test
is
wrong.
I
hate
I,
don't
wanna,
I,
really
hate
redefining
my
test,
but
I
thought
something
was
working,
but
on
first
computation.
This
is
correct
on
second
computation.
This
doesn't
seem
right
anymore.
Oh.
B
A
Jesus,
okay,
first,
this
is
first
winners.
I
think
I
did
the
wrong
thing.
So
I
got
my
two
tests
mixed
up.
The
first
test
was
supposed
to
be
the
first
one,
meaning
no
not
a
moving
average.
It
sends
first
winners
and
then
it
sends
first
winners
again
on
the
second
computation
and
the
third
computation.
It
sends
the
second
winners.
Okay,
now
when
there
is
a
moving
average,
it
sends
first
winners,
but
it
doesn't
send
first
winners
again,
it
sends
second
winners,
so
I
sent
I
changed
the
wrong
one.
A
And
then
it
sends
second
winners
of
a
second
time.
First,
winners.
Second,
printers.
Second
winners:
oh
okay,
it's
driving
me
kind
of
crazy,
but
it's
better
to
find
this
stuff
in
your
tests
and
not
find
it
okay,
so
I
got
a
certain
I
got
okay,
so
I
got
through
all
the
way
to
the
second
computation
of
the
set
of
the
moving
average
test.
A
That's
good!
Okay!
So
let's
set
a
breakpoint
there
rerun
dive
in
and
see
what's
wrong
with
the
period
because
it's
always
the
period
okay.
So
the
compute
count
is
two,
but
we
also
have
a
duty
cycle
period,
which
is
the
same
so
it
doesn't
matter.
It's
going
to
be
two,
no
matter
what
right
the
periods
going
to
be
to
our
ABCs
are
three
and
seven
right.
This
is
our
second
one
and
our
winners
are
four
and
eight
all
right.
So
this
is
where
I've
got
my
test
wrong.
I
think
yeah.
A
Our
winners
are
four
and
eight,
but
I'm
pretty
sure
that
I
have
my
test
wrong
here.
There's,
don't
don't
don't
talk
like
that
Falco!
Please
know,
I've
thought
the
same
thing.
You
know
you
end
up
having
your
if
you're
not
care,
if
you're,
not
careful,
you
end
up
reimplemented
the
logic
you're
testing
in
your
tests,
which
I
have
done
before
okay.
So
this
is
wrong
on
the
second
compute.
A
B
A
I
do
yeah,
let's
be
super
explicit
about
this
once
again,
once
we've
done
this
all
right,
so
there's
no
third
yet,
but
this
is
correct,
we
should
expect
now
three
should
be
0.5,
4
should
be
ease
or
5,
7
should
be
0.5
and
8
should
be
cleared
by
5.
So
let's
just
do
basically
the
same
same
thing
that
we
did
here
but
4
different
indices.
A
B
A
B
A
A
A
A
Okay,
so
we're
on
the
third
compute
here
third
compute,
with
new
winners,
we're
sending
in
the
second
winners
again
the
second
time.
So
this
should
be
right
and
if
the
period
is
two,
we
should
get
a
hundred
percent.
Four
four
and
eight
just
like
we
have
here
for
th
three
hundred
percent
and
everything
else
should
be
zero.
So
if
that's
not
happening,
we
got
problems
and
it's
not
happening.
A
B
A
B
A
Think
through
this,
even
with
the
small
number
of
iterations-
and
just
manually,
you
know,
do
the
math
and
what
what
I'm
confused
about
perhaps
is
what
this
being
calculated
here
like
okay,
what
is
the
initial
value
of
overlap?
Duty
cycles,
for
example?
Let's,
let's
do
active
duty
cycles,
let's
see
if
we
can
find
this
okay,
so
it's
zeroed
out
by
a
column
mini
column.
A
A
A
B
A
A
The
active
columns
are
an
array
containing
indices
of
active
columns,
the
sparse
set
of
columns
which
survived
inhibition.
The
winner
columns
now
they're,
not
I'm,
sort
of
using
the
wrong
terminology
here,
because
they,
this
is
sort
of
deciding.
We
have
decided
the
winners
yet
because
boosting
gets
involved,
but
so,
but
they
are
they're
the
active
columns.
It's
arrived
in
abyssion.
A
A
A
A
A
A
A
A
A
A
A
A
A
A
Not
making
nearly
as
much
progress
as
I
wanted
to
make
here
so
I
just
need
take
a
deep
breath,
but
once
let's
forget
this,
we
can
just
do
the
same
thing
for
overlap,
duty
cycles
and
we'll
have
that
working,
but
I
wanted
to
get
this
function
running
without
keeping
a
whole
thousand
array
a
list
of
every
many
columns,
overlap
and
active
duty,
an
activity
which
is
just
gonna
balloon.
You
know
hugely
and
I
saw
how
it
was
worked
in
new
pic
and
I
thought.
Oh,
that's,
clever
is
just
a
moving
average
calculation.
A
A
A
For
example,
I'm
on
my
third
compute
and
I
mean
these
tests
seem
right
to
me.
If
the
period
is
two,
this
should
be
one.
This
should
be
one.
Everything
else
should
be
zero,
that's
not
what's
happening,
and
you
can
see
why
right
here,
because
we're
looking
at
the
active
duty
cycles
or
right
here,
let's
right
here
where.
C
A
A
A
A
A
A
A
That's
what
I'm
confused
about
is
because
I
don't
know
the
the
dimensionality
of
this
return
value.
It
looks
like
it's
just
a
one-dimensional
array
of
numbers
between
0
and
1,
so
which
is
the
same
as
duty
cycles.
If
that's
the
same,
that's
what
gets
passed
in
and
it's
returning
a
mutated
version
of
that.
Well,
another
copied
and
changed
version
of
that
with
the
same
dimensions.
New
input
should
be
the
same
dimension
as
duty
cycles,
but
here's
what
confuses
me
for
duty
cycles.
A
A
That
certainly,
is
what
it
seems
to
be
because,
if
I
look
at
what
we're
passing
in
here,
the
overlap
duty
cycles
is
zero.
It
out
to
1
0
/
mini
column,
so
that's
initially
what
it
starts
out
as
I'm
looking
at
the
wrong
one.
But
it's
the
same
thing.
This
is
the
dimensionality
of
the
mini
column.
Since
the
this
one
number
/
mini
column,.
A
A
One
two
three
so
so
now
we're
in
the
right
place.
It
takes
ten
cycles
to
fill
the
buffer,
but
where
are
you
getting
the
ten
from
because
there's
ten
many
columns?
This
is
I'm
doing
this
calculation
once
per
mini
column,
so
it
should.
The
buffer
is
only
too
long
because
the
period
is
two:
that's
the
window
size
and
I'm
dividing
by
the
period.
So
if
duty
cycles
index
three,
which
is
0.5.
A
C
C
A
Think
I
see
what
you're
saying,
and
this
is
again
what
Eric
Collins
was
saying
earlier
is
is
that
we
need
to
see
more,
oh
all,
right,
okay!
So
so
what
do
you
think?
What
do
you
think
about
going
to
my
tests
and
trying
to
define
some
tests
where
I
send
it
a
bunch
like
a
lot
lot
lot
more,
like
maybe
I'll,
send
the
first
input
a
hundred
times
the
second
input
twice
and
then
assert.
A
A
A
C
A
A
A
A
Just
didn't
I
didn't
realize
that
that
moving
average
formula
would
would
do
that.
This
I
mean
you
guys
all
told
me
that
Eric
told
me
Mark's
been
trying
to
tell
me
I,
don't
like
that
at
all
it
sucks
I
mean
the
the
thing
that
I
want
to
do
is
the
thing
that
would
make
sense,
but
is
too
prohibitively
expensive.
It
I
think,
is
to
keep
track
of
every
many
columns.
Last.
A
Activity
and
overlap
for
the
duty
cycle
period,
which
is
the
number
of
mini
columns
times
the
duty
cycle
period,
scalar
values
which
duty
cycle
period
is
generally
a
thousand,
so
it's
the
thousand
times
the
size
of
mini
columns
and
the
same
thing
for
overlap.
So
two
thousand
times
more
memory
than
this
method
and
said:
I
really
want.
There
are
other
types,
other
filter
types
at
different
properties,
but
this
is
good
filter
typing.
You
can
deal
with
the
delay
properties.
A
A
A
A
A
A
A
A
A
A
A
A
B
A
A
A
A
But
this
this,
the
this
is
not
going
to
work.
We're
not
going
to
get
one
for
this,
although
it's
ideally
what
we
want,
and
if
the
yeah,
the
three
and
seven
values
will
not
go
to
zero,
that's
what
we're
finding
for
sure
and
and
the
four
and
eight
values
will
not
go
to
1.
What
we
get
here
is
0.25
and
0.75
whoops
and
same
here,
0.25
0.75
and
then
slowly
they'll
resolve
over
time
to
better
values.
A
A
A
A
A
Yeah
you've
told
me
that
before
Eric
I
just
didn't
get
it
I
think
I
get
it
it's
more
like
it's,
not
an
exact.
It's
not
exact
like
I
want,
but
it's
it's
honestly,
it's
working
as
expected.
It's
just
not
exactly
what
I
want
it
to
do,
but
it
just
but
it's
doing
it
so.
A
A
So
sorry,
that's
all
it's
all
this
this
formula
here
that
this
is
not
going
to
give
you
the
resolution
that
I
wanted
unless
I
keep
track
of
every
value
over
the
window
and
I.
Don't
there's
no
need
to
do
that
right
because
we're
going
to
see
a
lot
of
values
so
we're
not
gonna.
Do
it
we're
gonna
we're
going
to
keep
it
the
way
it
is
and.
A
Well,
I'm
gonna
do
the
overlap,
30
cycles,
we
didn't
even
get
to
overlap
duty
cycles.
This
time
we
just
introduced
the
period
so
we'll
do
overlap.
Duty
cycles,
the
next
time
and
hopefully,
actually
do
some
graphics.
So
we
can
get
show
overlap,
duty
cycles
here,
along
with
active
duty
cycles
because
they
look
different.
They
look
quite
a
bit
different.
It
looks
a
lot
more
interesting
with
topology
I'll
show
you
one
thing
about
active
duty
cycles.
Before
we
go.
A
B
A
A
A
C
A
And
I
had
the
impression
that
the
active
duty
cycles
were
going
to
be
like
a
percent
of
activity
on
and
off
activity,
and
the
overlap
duty
cycles
would
be
a
count
average
count
of
an
overlap,
score
I
thought
that
was
the
case.
I
might
be
wrong
about
that,
but
we'll
we'll
find
out,
obviously
we'll
find
out.
A
A
I'm
not
gonna
commit
anything
right
now,
because
I
might
go
push
this
stuff
to
a
branch.
My
remote
branch,
but
I'm
not
going
to
commit
or
Quetta
pull
request
because
I'm
I
don't
think
this
is
nearly
ready
to
to
push
or
anything.
So
it
just
is
what
it
is
right.
I'll
go.
It
is
what
it
is,
which
is
the
most
meaningless
statement.
You
can
say,
take
care
everybody
I
am
going
to
take
off.
Go
pick.
My
kid
up
from
baseball
camp
have
a
wonderful
day.
Everyone
thanks
for
tuning
in.