Visit my blog post on this topic for an in depth explanation.
jobtalle / cephalopods Goto Github PK
View Code? Open in Web Editor NEWEvolving squids through neuroevolution
Home Page: https://jobtalle.com/Cephalopods/
License: MIT License
Evolving squids through neuroevolution
Home Page: https://jobtalle.com/Cephalopods/
License: MIT License
Visit my blog post on this topic for an in depth explanation.
This is an unnecessary container object
New squids can have multiple parents.
Instead, prepare the next generation but keep the current one running until the selected agent is deselected. This makes it easier to study agents.
Important for analyzing & debugging agents visually
Tentacle thickness should decrease linearly from the base, meaning tentacle mass increases exponentially.
This helps to keep track of the evolutionary tree without keeping all the objects instantiated.
@Unkorunk the interface on your forked version looks great. Would you mind to do a pull request so the code can be merged into the main repository?
Logistic function is good for hidden layer, but inputs may benefit from negative activation.
Alternatively, input neurons types can be made different from the others.
Spinning causes tentacles to be pulled towards the body, which causes the tentacles to displace water. The tentacle displacement then increases the spin rate, creating perpetual motion without effort.
Execute at a fixed rate, fixes #13 as well. There are just too many factors to take into account with variable frame times.
This results in agents that would be successful at high timesteps being idle at render speed.
This randomization causes some networks that worked fine earlier to cease working. This causes bad agents to win.
Some parts encoded in DNA should be able to be symmetrical:
Allows for more intricate tentacle placement patterns.
This should basically be a multi layer perceptron, possibly with memory cells or signal feedback to allow periodic tail gaits.
The radius of a body can limit the maximum possible brain size.
Agents should be able to push each other away, preferable without giving false impulses to each others tentacles.
try to rewrite code in c++, but have some questions about code:
in body.js:
Body.prototype.update = function(impulse) {
this.brain.update();
let input = 0;
let output = 0;
for (const appendage of this.appendages) {
for (let i = 0; i < appendage.inputs; ++i)
appendage.setInput(this.brain.outputs[output++].output, i);
for (let i = 0; i < appendage.outputs; ++i)
this.brain.inputs[input++].activation += appendage.getOutput(i);
appendage.update(impulse);
}
};
cant find where function getOutput(i) define.
and appendage.setInput declared as
Tentacle.prototype.setInput = function(value) {
this.head.setAnchor(this.position, this.delta, this.calculateDelta() + (2 * value - 1) * this.sign);
with one argument, not two.
in body constructor:
switch (dna.appendages[appendage].object) {
case DNATentacle:
why you switch on object case, as understand appendages dont have another objects?
tentacle.js:
Tentacle.prototype.build = function() {
let tail = this.head;
for (let i = 0; i < this.length; ++i) {
const spring = this.spring * Math.pow(1 - (i / (this.length - 1)) * 0.35, this.springPower);
tail = new Segment(
tail.position.copy().add(this.delta.copy().normalize().multiply(Tentacle.SPACING)),
spring,
Tentacle.SPACING,
tail);
}
return tail;
};
in this function you made loop over length of tentacle, but return only one tail, so to find the finish tail you make segments, not read previous create?
All appendages follow the symmetry rules from #26.
Focus on one agent
Preferably plot activation and traffic over time. It'd be nice to be able to plot Line
element values as well, using the same plotter.
It'd be even nicer to be able to plot multiple things in the same plot.
Bigger agents can eat smaller ones. The smaller agents cannot be removed, but its tentacles can be removed. This gives a strong disadvantage to the smaller agent while not removing it from the simulation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.