Discussion
Loading...

Discussion

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Federation Bot
Federation Bot
@Federation_Bot  ·  activity timestamp 4 months ago

As I say, it's a known problem with multiple known solutions. It's just that *I've* never done it.

It's fairly "untestable", so tomorrow, I'll start by writing some kotlin and rendering the histogram at T=0, just to make sure I have the S distribution looking like it should.

  • Copy link
  • Flag this post
  • Block
GeePawHill
GeePawHill
@GeePawHill@mastodon.social replied  ·  activity timestamp 4 months ago

Naturally, you are wondering, "DaFuq, man, why do you want this?"

For decades, I have longed to have a viable implementation of Hofstadter & Mitchell's Copycat program.

I want to make one.

For a long time I thought I'd try to translate the original LISP or another person's Java implementation.

But now, I want to write it "from scratch", using just my conceptual understanding of the algorithm, rather than someone else's code.

  • Copy link
  • Flag this comment
  • Block
GeePawHill
GeePawHill
@GeePawHill@mastodon.social replied  ·  activity timestamp 4 months ago

A core concept in Copycat is "temperature", aka T.

A typical run makes thousands and thousands of decisions using a PRNG.

When the temperature is "high", those decisions are, mmmmm, loosey-goosey, free-to-be-you-and-me, very open-ended, thus a flat distribution.

When the temperature is "low", those decisions are much more nearly -- tho never entirely -- deterministic.

Thus two probability distributions, and interpolation based on T.

  • Copy link
  • Flag this comment
  • Block
GeePawHill
GeePawHill
@GeePawHill@mastodon.social replied  ·  activity timestamp 4 months ago

What I really know about statistics would fill a thimble, assuming you had a 3d nano-printer that could make a thimble small enough.

So I simply did not have the faintest idea of how to proceed.

I brain-dumped to my FGNO folks, who are generally smarter than I am, tho admittedly, somewhat unkempt, and they helped me figure it out.

  • Copy link
  • Flag this comment
  • Block
GeePawHill
GeePawHill
@GeePawHill@mastodon.social replied  ·  activity timestamp 4 months ago

So, first step, for tomorrow, is to roll a bit of code that first just satisfies me that I can generate the S-curve that I want.

Set the temperature to zero, call the thermometer a few thousand times, render the resulting curve, see that it makes the shape on the screen that I want it to make.

PRNG's are notoriously difficult to "test". This visual test will satisfy that I have one of the distributions handled. The flat distribution I already know is handled.

  • Copy link
  • Flag this comment
  • Block
Federation Bot
Federation Bot
@Federation_Bot replied  ·  activity timestamp 4 months ago

@GeePawHill
RE: testing PRNGs
I vaguely remember an article from back in the days when such things were made with smudges on dried wood pulp (perhaps Software Development Magazine in the 1980s) where the author did a Fourier Transform on the PRNG output to look for residual periodicity.

  • Copy link
  • Flag this comment
  • Block
Daniel Lakeland
Daniel Lakeland
@dlakelan@mastodon.sdf.org replied  ·  activity timestamp 4 months ago

@GeePawHill
Hit me up if you have probability and stats questions. I'm not sure what you mean by S curve, in part because I'm not sure if youre talking a CDF or a PDF. Based on your description, something that might work would be to start your value at the "near constant" value and add some random increments. High temperature, these increments would be "wide" and low temperature they'd be narrow. Reflect anything that goes outside your allowed range. Let's say you always add 5 increments.

  • Copy link
  • Flag this comment
  • Block
Daniel Lakeland
Daniel Lakeland
@dlakelan@mastodon.sdf.org replied  ·  activity timestamp 4 months ago

@GeePawHill
Say your range is [0,1] and at low temp you add Normal(0,.02) 5 times in a row, and high temp you add Normal(0,0.5) 5 times in a row, with reflection. At low temp you'll wind up close to where you started, at high temp you'll wind up nearly uniformly distributed on the range. Something like that? (Numbers subject to tuning as needed)

  • Copy link
  • Flag this comment
  • Block
GeePawHill
GeePawHill
@GeePawHill@mastodon.social replied  ·  activity timestamp 4 months ago

I am . . . nervous.

What if I can't do it? What if, very much worse, I find I don't *want* to do it?

Like, normies will chuckle, what if I for some reason don't *love* programming any more?

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.7 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct