Project Arachne

This robotics project does not directly involve Monty but I believe it to be complementary to Monty, taking a bottom up approach to AGI in contrast to Monty’s top down approach.
Perhaps there will be a way to link the projects at some point in the future as there
seems to be much interest in applying Monty to robotics.

If you are kind enough to take the time to read my ramblings please be assured that the
concept is not entirely pie in the sky, the first unit has been built and its little sensorimotor
system is buzzing away waiting for a brain to tell it what to do.

I will present the progress in stages. Part one attached.

Project_Arachne_Part1_Concept.pdf (166.6 KB)

3 Likes

I found the PDF to be interesting, promising, and well written; I’m looking forward to reading the upcoming parts. The project title hints that the design of the robot(s) might be modeled after spiders (e.g., compound eyes, several legs). If so, I approve; Monty shouldn’t be too firmly tied to accidents of mammalian biology…

Hi @Rich_Morin

Thank you for the compliment. Yes, it has six legs for inherent stability, hence the name (gonna get some letters about that one).

Actually Arachne is from Greek mythology, a weaver who believed she could weave better than the goddess Athena. Make of that what you will :slight_smile:

Alex

2 Likes

@Alex I look forward to part two. I’d liked the analogy of the Wright brothers not trying to build a jumbo jet but rather attempting to implement the simplest possible thing capable of powered flight.

1 Like

FWIW, a quick search came up with a number of hexapedal robot kits (e.g., for STEM projects). Some of these look large enough to support added sensors and effectors. Also, they might be able to navigate a garden, etc.

FYI, Benedict Jacka’s Alex Verus series (highly recommended if you like that sort of thing :-) features a giant, sentient spider named Arachne.

Hi @Rich_Morin

Yes, there are several hexapod kits out there. I actually started the project using the Freenove kit
and trying to modify it. But I realised I was going down the same track as the robot arm, that of building a machine with no sensory feedback from its skeletal muscular system. @vclay, in her dissertation ‘Learning as an Active, Sensorimotor Process’ says that ‘cognition is not just a product of the brain, but the whole body, its sensors, and effectors.’
This, I think, is the difference between building a machine and building an artificial creature. I didn’t check them all, but I don’t think any of the kits have that level of feedback. Modifications to the Freenove kit would have to be so extensive I may as well start the design from scratch, so I did.

The Benedict Jacka novels look interesting, I had not heard of that writer. I will take a look when I get time.

1 Like

Part 2, the hardware architecture

Project_Arachne_Part2_Architecture.pdf (742.4 KB)

2 Likes

Part 3, the final part of the sensorimotor system build

Project_Arachne_Part3_Mechanics.pdf (946.9 KB)

I think that intelligence is a dynamic process with the brain always trying to create a form of equilibrium between incoming sensor signals and outgoing motor signals. For example recognising a can of spam is not a single event but and ongoing process lasting as long as the can of spam remains in the field of vision. Perhaps progress on the brain structure design is better demonstrated in video rather than still images. Hopefully I can present those videos in some form.

If anyone is interested in getting involved in the brain creation phase of this project please get in touch.

1 Like

Hi @Alex that looks like some pretty exciting progress! I’d be curious about your plans for the “brain” for this hardware. Have you had more thoughts on whether you could use Monty for this? Are there any issues with using Monty (e.g. it’s control not being advanced enough yet)?

For example recognising a can of spam is not a single event but and ongoing process lasting as long as the can of spam remains in the field of vision.

Nicely said. It sounds like you are thinking about perception in a similar way to how it works in Monty :slight_smile:

I’m looking forward to more updates (videos welcome :smiley: ) and maybe some discussion around the brain part of it!

Best wishes,

Viviane

Hi @vclay

I did have brief discussion with @tslominski about the feasibility of using Monty. Tristan explained that TBP is focussing on cortical (and cortical adjacent) brain structures rather than the cerebellum and brain stem structures involved in fine motor control and muscle memory. So at present Monty would only go as far as generating a signal to walk, and not contain the pattern generation capability required by robotic limbs to walk, what I have referred to as a top-down approach in my documents. I have been pursuing a bottom-up approach in the hope of learning about how to implement higher functions by implementing lower level functions first.

I could talk at length about the brain structure I have in mind, but here is precis :slight_smile:

I plan to build the brain using artificial neurons (weights, bias, activation function etc) but connected in specific, initially handcrafted, structures rather than the regular arrays commonly used in AI.

One group of neurons will create a state machine to move the limb from one position to another position. An output group of neurons will convert the generic ‘move’ signals to muscle-memory specific positions stored in the output neurons (the muscle-memory will be specific to each robot unit and will have to be learned and updated over time).

The muscle-memory signals will go to the servos and also be fed back to a simulation group of neurons. The simulation neurons, with the addition of a temporal input, will generate a linear simulation of the expected motion of the limb motors. The outputs from the simulation will be fed back to the input layer.

The input layer will compare expected motion against active motion, any significant deviation will activate a connection to alert the state machine and higher level control to a possible problem. The input layer also compares actual position against final target position to trigger the state machine onto the next state.

All of this structure is replicated for power usage, setting maximum power to use in the move and checking to ensure it is not exceeded. Speed of the move is another variable in the mix, as is foot pressure.

A very simple diagram is shown below, where each block represents many neurons. Neurons will have multiple local connections and some long distance connections much as we see in a biological brain. For example, an over-power signal, the robot equivalent of pain, will go to the local state machine group to stop the move immediately and also to many other regions to alert the whole brain to the situation, just as when we step on a sharp object our whole brain is alerted to the event. Additional blocks will handle strategies to deal with problems such as the foot not hitting the ground when expected.

I intend to implement the neurons and the connections between them as a large data structure. Each ‘record’ in the data structure will represent a neuron, its activation function, weights and connections from other neurons. The data structure will expand to gigabytes and eventually terabytes. Processing of the data structure can be carried out by whatever means are available, be it software, GPU or even arrays of FPGAs. The data structure and all the knowledge it contains remains independent of the means of execution and thus hopefully protected again obsolescence.

The downside is that none of the tools required to create these structures currently exist, as far as I am aware, and so they also need to be created alongside the brain structure itself. Whilst the initial networks can be hand-crafted it will soon reach the point where the structures need to be defined at a higher level and compiled by a new type of neural network compiler.

I will try to create a video showing a walking motion as depicted by nerve signal patterns coming from a single limb, the melody of motion I referred to some time ago.

In answer to the obvious question ‘how does it learn’ I can only say, I’m working on that :slightly_smiling_face: , but it’s not back propagation from a global error signal, no such signal exists. Rather it will be at a group level to correct mismatches between simulation and sensor input.

An important point is that the systems is always active, sensory data is always pouring in and the neural network is continually responding to any changes.

1 Like

The video shows the sensory feedback from a single leg. A bit rough and ready but I hope it gets the concept across. Got some nasty resonances in the test bed mechanical assembly, just hope they don’t occur on the full system. Remember this is a $50 piece of electronics and mechanics.

So even though there are just ten sensor signals coming back from the leg I think it’s enough for an artificial brain to ‘feel’ the leg, how it is positioned, is it being pushed or pulled, is it stuck, can it feel the ground under its foot. For six legs that’s sixty senses to monitor for the legs alone.

I think it is important that the sensor feedback is from the real world rather than a simulation of the real world, in that case the brain would be simply be comparing its internal simulation with an external simulation and nothing would be learned.

From an ease of use perspective, the sensor feedback is just a bunch of numbers in an array. When another sensor is plugged in another bunch of numbers (I like to think of them as nerve endings) will light up, no issues with APIs, drivers or libraries just more sensory data.

The other concept the graphs nicely get across is the temporal aspect, time is always moving forwards, the world never stops, even when you stop walking you don’t stop responding to sensory data from your legs.

Earlier @vclay asked “Have you had more thoughts on whether you could use Monty for this?”, the gears in my brain turn slowly, but eventually I realised that if Monty could send a signal to say ‘walk’ then this old brain cerebellum type system could do the rest. The video feeds from the cameras could be fed into Monty.

2 Likes

Hi @Alex

really cool project, thanks for the updates, and sorry for the late reply on it!

I think Monty learning and doing inference based on the camera input and then sending relatively high-level motor commands (like “walk to location x”) to be executed by your motor system could be one interesting way to combine them. But reading your description in the last posts, I wonder what would happen if you hooked up all the sensor outputs you have to learning modules. I would imagine Monty could then learn models of those movements and make predictions about what will be sensed next. Maybe the type of models that would be learned in somatosensory and motor cortex.

Unfortunately, it wouldn’t be straightforward to do with Monty today since Monty’s models currently don’t represent time. But we plan to add this ability to model behaviors over time to Monty this year. So once that is implemented, I would be super interested to hook up some learning modules to Arachne’s sensors and see what models it will learn!

Best wishes,

Viviane

Hi @vclay

I’m happy to have a go at hooking up the sensors to learning modules. I can probably get some hardware to your team when you are ready to try. I can replicate your experiments but I am unlikely to be sufficiently familiar with Monty to be able to contribute code myself. I am just installing Monty to get some understanding of the system.

I guess you will need to generate a regular time event to act as a time sense to spread throughout the modules. In user-space there will always be times when linux disappears for many milliseconds to do system management, but hopefully it will be consistent enough.

The arachne hardware generates sensor samples at 100Hz but you don’t have to use them all. I think 10Hz would be a minimum rate (my demo was at 100Hz). Monty will need to be able to absorb several hundred samples per seconds with a full set of limbs attached.

Should be interesting :slight_smile:

All the best

Alex

2 Likes

Hi @Alex that would be great! Definitely let us know when your hardware is ready to give this a try :slight_smile: (and I will let you know when Monty is ready, too, since it still needs to ability to model time series)

There is a lot of discussion of sensorimotor intelligence, including in the BBC programme mentioned recently, so I just wanted to describe what I understand by the term (using the Arachne robot as an example). Sensorimotor intelligence 101 you might say, the simplest beginnings.

The robot is placed in the centre of a square pen 3m x 3m with solid walls. The brain is running on a PC nearby. The remote power-on is pressed.

At switch on the robot system is in a relaxed state, all motor muscles are relaxed, drawing minimal power and in what could be called the sleeping position. The IMU indicates level posture, no motion. Eyes and ears are disabled. Ultrasonic proximity detectors and lidar are also disabled. Power draw from battery is nominal. The brain remembers this sensory pattern as what it means to be sleeping.

A boredom timer in the brain issues the signal to stand up. The brain knows the muscle positions to standup from genetic memory, but it does not yet know what it feels like to stand up, it will learn this the first time it stands up. On all subsequent occasions it will compare the sensory signals created during standing up with its memory of the feeling of standing up, looking for any discrepancies that could indicated a problem. Senses include the positions and power draw of all 24 muscles as they move, pressure increasing on all feet and the IMU indicating vertical motion with minimal pitch and roll. When the standing position is reached the IMU indicates no motion, foot pressure stabilises and muscle power becomes steady but more than when sleeping. This is what it feels like to stand still, also memorised.

For simplicity only Lidar is enabled at this stage. The lidar generates a world model of a two dimensional square world with the robot at the centre of it. Because the lidar is a sensor for sensing the external world rather than the internal body state, this square world is memorised in an area of the brain reserved for world model rather than body model. What moves with me is part of me, what doesn’t move with me belongs to the world model. This is a fundamental concept for any intelligence. My position in the square world is home, a point of reference to explore from and a place to return to. The conceptual memory of home is also created.

For convenience the robot also has genetic memory of how to walk (saves all that messy business of learning to walk). The exploration timer sends a signal to walk forward a few paces. As before, this generates a whole bunch of sensory memories of what it feels like to walk forward, leg motions, foot pressures, IMU signals. Crucially, the lidar square does not move with me (me being the robot). This is the fundamental distinction between me and the world. I move (as indicated by my IMU) and the world stays where it is, so I am moving in the world. If the world were to move with me it would be very disturbing.

If there is another moving object in the world then things get complicated. Perhaps this is why animals tend to freeze when they see another moving object, it makes it much easier to track the moving object if you are not moving yourself. At the beginning of intelligence other moving objects are the most important things in the world.

A secondary layer of memories must also be created chronicling what I did, I awoke, I stood up, I walked forward. The autobiographical self.

From these fundamental beginnings more and more complex world models can be created using more powerful senses. and more and more complex interactions with the world can be enacted and memorised.

1 Like

I thought perhaps I should post an update lest people think the project has stalled. I only get to work on this in my spare time so progress is consequently rather slow.

In a previous post I attached a sketch of how I thought a neural network could be architected to create a walking action for a single leg, but there are no tools to create such an network in the manner I was proposing.

So I have been writing a compiler able to turn a textual description of a neural network into a binary structure. The text is essentially a neural description language (NDL).
Note that the output is not an executable, it is simply a definition of a network of neurons and the connections between them. Connections can be strengthened, new connections added or connections removed by the learning process.

The neurons in the structure must be processed in order to bring the network to life, much as the circulatory system and endocrine system enable a biological neural network to function. The structure may be processed by software or hardware or most likely a combination of the two. Separating the structure from the means of execution provides a way of safeguarding the structure from technological obsolescence. Once the structure begins to learn it is no longer equivalent to its source code, recompiling it would be the equivalent of resetting a human brain to that of a new born baby.

I have added into the compiler the option to generate a graphviz dot file for the network structure in addition to the binary (see image). The network will rapidly become too complex to draw, but for early development I think it will be useful. The network shown is for a single leg and does not yet contain any structures to handle unexpected sensory input.

The busiest neurons (mel1, mel2 and mel3) generate the three ‘note’ melody of walking. I initially thought it should be a state machine but perhaps it should be more like a pattern generator continuously generating the pattern of walking and only stopping when there is a mismatch between anticipated sensory input and actual sensory input - the learning opportunities.

The NDL could currently be called assembler language, higher level directives will be required to build bigger and bigger networks, even perhaps cortical columns.

Next stage - create a means to process the structure !

2 Likes

Dang, that’s pretty neat! Reminds me of this:

Certainly looks like a similar concept, nice graphics. I like the grey boxes representing hundreds of millions of neurons :slight_smile:

I have a suspicion that these high level implementations will grind to a halt when there are tens of millions or hundreds of millions of neurons to process, let alone billions. A shift to hybrid processing of software with custom hardware acceleration will be required. Could perhaps use PC motherboards bare metal. Need to avoid the warehouse-full-of-servers solution, it’s not sustainable.

It is often said that the path from sensory input to motor output response may only involve hundreds or thousands of neurons, therefore not so much processing is required as we might think. But surely the parallel processing nature of the brain means that many many potential responses can be evaluated in parallel, with only the selected one reaching the motor outputs ?