Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sdesalas/automata
Robot brain and nervous system. From the ground up.
https://github.com/sdesalas/automata
arduino artificial-life nodejs robotics
Last synced: 8 days ago
JSON representation
Robot brain and nervous system. From the ground up.
- Host: GitHub
- URL: https://github.com/sdesalas/automata
- Owner: sdesalas
- Created: 2016-12-30T12:10:15.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-06T15:39:13.000Z (almost 8 years ago)
- Last Synced: 2024-11-22T00:33:50.307Z (2 months ago)
- Topics: arduino, artificial-life, nodejs, robotics
- Language: JavaScript
- Homepage:
- Size: 1.14 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# automata
All a robot knows is perceived through their sensors: digital, analog, and waveform. Concepts such as 'right', 'left', 'forward', 'edge', 'wall' are all human-made constructs that have no place in the world of a robot, their reality is instead shaped by changes to sensor data in real time, and their ability to modify what they perceive through actuator commands that change the world around it.
This project is an attempt at full robotic automation, starting with a void of concepts and interactions that can be filled randomly with greater or lesser success depending on sensor input.
## why?
Because [I like building robots](https://github.com/sdesalas/robotics) but I can't be stuffed coding every single interaction with their environment, I rather they learn on their own, using trial and error (ie random incremental steps) biased with my assistance.
The name `automata` is a play on words with the popular *[firmata](https://github.com/firmata/protocol)* protocol.
## why javascript?
Because its the language i use most on a day to day basis. It runs on tiny, low-power devices, and has support for usb serial via awesome projects like [node-serialport](https://github.com/EmergingTechnologyAdvisors/node-serialport).
## autodiscovery
The autodiscovery protocol allows an process of `automata` to discover attached USB microcontroller devices and their capabilities. There is no magic here. Each microcontroller contains custom firmware that can be queried over serial for a list of available actuator commands and well as examples of each command.
This creates the following type of conversation:
```
? --> Automata: What commands are available on this (USB) device?
?>B|W|R --> Device: I have 3 types of actuator commands for you, 'B' (buzzer), 'W' (wheels), 'R' (radio signal)
? Automata: Give me an example of 'B'
?>B Device: Use `B Automata: Alright do it. I'll check the sensor feed see what happens.
```## sensor stream (or sensor cycle)
A constant feed of sensor data is pumped into automata. This is a basic round-robin cycle through all sensors outputting data at an arbitrary interval. So long as the interval speed is maintained, the `automata` process takes care of the pattern matching and highlights changes in sensor data that might require actioning.
For example:
```
B>0 --> buzzer is not doing anything
W>ff --> wheels are going forward at max speed
F>f --> front IR sensor is registering max distance (nothing in front)
B>f --> back IR sensor is registering max distance (nothing behind)
L>5 --> left IR sensor is registering an object at low distance (something to the left)
R>f --> right IR sensor is registering max distance (nothing to the right)
B>0 --> buzzer still not doing anything
W>ff --> wheels (still) going forward at max speed
F front infrared sensor is registering an incoming object
```## experimentation
Incremental experiment of known commands and resulting changes to sensor input allows the robot to build an understanding of how to interact with the world around them. See the 'autodiscovery' section for an example.
## conditioning
Sensor input is expressed as vectors allowing for easy change detection and map input vectors to actuator commands. Conditioning occurs when given a particular vector input, certain command outputs are more likely to occur than anything else.
## self-learning
Whenever an action has taken place this can be reinforced to create conditioned responses that are likely to occur with increasing frequency. The logic here is taken from nature where neural pathways are reinforced through repeated use. While a lot of this can occur randomly, external training and guidance help the robot become effective much more quickly (see next section).
## training
The ability to associate certain sensor inputs as positive (pleasure) and negative (pain), allows for reinforcement to be strengthened or weakened by a human mentor or robot buddy. Humans can train an `automata` process using two buttons for each type of reinforcement (red: negative, green: positive), but as a robot starts associating these with other sensor inputs they can also be influenced and trained by other robots.