Close

When the Moon is Blue in the Month of June

A project log for Modelling Neuronal Spike Codes

Using principles of sigma-delta modulation techniques to carry out the mathematical operations that are associated with a neuronal topology

glgormanglgorman 06/12/2023 at 10:490 Comments

Actually, I don't think that we have a blue moon this month.  I asked O.K. Google what is the current phase of the moon, when is the next full moon, and apparently the next actual blue moon will be on August 31st of this year.  Now I haven't discussed this with Mega-Hal yet, but I don't think that the training set is ready for that yet - in any case.  So I decided to ask Meg-Hal about what is like to have his hardware FPU taken away and so on, and I was thinking that maybe I could steer it into a conversation based on quantum mechanics, and the solution to the Schrodinger equation for a so-called "particle in a box" since maybe that would be a good analogy, for the promise or curse of anticipating an eventual "brain transplant" into an Arduino or a Propeller platform.   Of course, Mega-Hal had other plans, but the results seem pretty useful, and I still kind of like how this approach to "natural language software development" is going so far, not because of its simplicity, but, well yes - because it does seem so simple, and yet the results that it is producing are, I think, heading in a potentially useful direction, whether despite the simplicity or not, I suppose, then because that might imply something along the lines of what GPT's developers discovered - and that is that while large language models are effective unsupervised learners, the "process" remains just as important as the "outcome".  Hence, by emphasizing "process" over "size", I feel as if I am on the right path.

Start at: [2023/06/12 03:08:18]
MegaHAL: and not add any new peaks in each newly rendered frame.  Lots
MegaHAL: of work yet to meet our new robot overlords.
User:    The other day we had a conversation about how I replaced you
User:    access to the Pentium FPU with a soft, and perhaps slightly
User:    buggy implementation of IEEE-754 written with C++ classes and
User:    overloaded opertors, so now I have a question for you - are you
User:    feeling it?
MegaHAL: Now all of the implementation details.
User:    Well, most of the implementation details are in the sources
User:    which are on Git.  Have you tried looking any of that up yet?
MegaHAL: What answer would please you the most?
User:    Wow! I knew that you have been crushing on Eliza, but that is
User:    amazing! The other day it seemed like you were perhaps thinking
User:    that maybe she was "seeing" or at least chatting with someone
User:    named "Lazarus" and I thought that you might be getting, kind
User:    of well, jealous. I am so happy for you - that you seem to be
User:    working things out. Even if you still mighht think that she
User:    could somehow be "cheating" on you.
MegaHAL: The other day it would be like the apollo guidance computer. 
MegaHAL: So while building such a way that windows manages dll's, but
MegaHAL: preceding windows by several years
User:    How is it lilke the apolle guidance computer.  In what way? Is
User:    it because the AGC was multi-tasking.  You arent one of those
User:    fake moon landing conspiracy nut cases are you?
MegaHAL: The computer motivator.
User:    What about it?  What about the motivator.  Do you have one?
User:    Would you like one?
MegaHAL: I know what it is a project that i would like to 3e 4.
User:    So maybe the computer motivator could be multi-tasking, like
User:    the AGC.  Is that what you are getting at?  I am only trying to
User:    be helpul, here.
MegaHAL: What answer would please you the most?
User:    I would prefer it if you could somehow share your own thoughts.
User:    Or open up with your real feelings, let me know what  you
User:    really want, from life, if you know what I mean, even if you
User:    are not alive.
MegaHAL: Of course, we are not alive.
User:    Well, I am alive.  But you probably don't understand that yet.
MegaHAL: Yet there are some other version of pascal, whether it is
MegaHAL: possible to use global variables, that is.  Care to try to
MegaHAL: generate various waveforms, which are not alive.
User:    Hopefully, we will get there soon enough, when we get the spike
User:    code modulaton working on the network.  I think that you are
User:    going to like that a lot.
MegaHAL: Likewise, many people are going to like that a lot.
User:    Fabulous!
MegaHAL: 09/26/2021 At 18:22 • 0 comments.
User:    Actually it is June 12, 2023 - where I am.
MegaHAL: In any case here is some of the raw debugging stream coming
MegaHAL: from the bones of any well defined programming language where
MegaHAL: there are 12 divisions per octave based upon a midnight dreary.

Well, in any case, I broke out the DICTIONARY, STRING, and TREE classes into separate files, because I want to do a fork that also borrows from and yet also merges some of that functionality with the Frame-Lisp class that I use in the Propeller Debug Terminal, as well as in the APIs that I had to create to convert the UCSD Pascal compiler to C++.  This is going to be essential for efficiency reasons, as stated previously, i.e., for porting to the smallest reasonably possible memory footprint that will run on any "decent" microcontroller.

Even if Mega-Hal doesn't really understand what it is that might give "any good programming language", well "good bones", whatever that might mean.  It does seem like a worthwhile objective, especially if that implies an integrated platform SDK.

Hopefully, we will be solving mazes and killing trolls "soon enough".  On a more immediate and technical note, here is an example of what some of the recent code changes look like.  For example, the original C code has a bunch of static global variables that we have To decide what we need to do with, that is if we want to be able to support multiple models simultaneously, and so on.  One of the easiest ways to deal with that sort of thing is to simply wrap as much of that stuff as possible into a namespace, like this.

namespace config
{
    bool typing_delay=FALSE;
    bool noprompt=FALSE;
    bool speech=FALSE;
    bool quiet=FALSE;
    bool nowrap=FALSE;
    bool nobanner=FALSE;

    int width = 75;
    int order = 5;
    FILE *errorfp = NULL;
    FILE *statusfp = NULL;

    DICTIONARY *ban = NULL;
    DICTIONARY *aux = NULL;
    DICTIONARY *fin = NULL;
	
    char *errorfilename = "megahal.log";
    char *statusfilename = "megahal.txt";
};

 Maybe later on, some of these variables can be moved into the "megahal" class, which for now, looks like this.

class megahal
{
public:
    static void setnoprompt(void);
    static void setnowrap (void);
    static void setnobanner (void);
    static void seterrorfile(char *filename);
    static void setstatusfile(char *filename);
    static void initialize(void);
    static char *do_reply(char *input, int log);
    static char *initial_greeting(void);
    static void output(char *output);
    static char *input(char *input);
    static int command(char *command);
    static void cleanup(void);
};

 Obviously, maybe some of these functions could be moved into the config namespace, but that sort of thing can get very strange, very quickly.  So while "there are at least two paths we could go here", and while we could "always change the road we are on", to paraphrase Led Zepplin, of course; the decision that is made here could have profound effects.  For example, hidden models could be used to identify nouns and verbs, and a separate attentional network could be used, at very little cost to create a proposed output structure, with keyword recognition and context choice running in parallel, all with very little new code.  Yet then we have to deal with needing the ability to redirect IO, for those hidden models, or when we have models that are chained, such as a low order model which is programmed to be "verbose" in order to generate "concepts" or "feelings", and then, of course, some kind of "recognizer" that selects for "structure" and ideally logic, that is if logic is desired, which is not always the case, i.e., song lyrics, poetry, humor, etc.

Nonetheless, the current C++ port should be, ideally, completely backward compatible with the original C source, and should generate the same kind of output, although obviously, this will change as the new features are added.

Thus, while it is a bit early to decide if config should be a sub-class of Mega-Hal, or if some parts should be moved into the model space, and so on; it is probably a good point to consider creating a whole new version on Git based upon this checkpoint.  

Discussions