ttl / evolutionary-circuits Goto Github PK
View Code? Open in Web Editor NEWAutomatically generates analog circuits using evolutionary algorithms
License: MIT License
Automatically generates analog circuits using evolutionary algorithms
License: MIT License
On long simulations crashes with this traceback:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/home/henrik/koodi/circuits/git/temp/circuits.py", line 132, in run
self.result = simulate(self.spice_in)
File "/home/henrik/koodi/circuits/git/temp/circuits.py", line 116, in simulate
spice = subprocess.Popen(['ngspice', '-s'],stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File "/usr/lib/python2.7/subprocess.py", line 1038, in _get_handles
p2cread, p2cwrite = self.pipe_cloexec()
File "/usr/lib/python2.7/subprocess.py", line 1091, in pipe_cloexec
r, w = os.pipe()
OSError: [Errno 24] Too many open files
There's some existing discussion on this bug and it seems that the subrocess pipe is left open for some reason.
Everything else except for the SPICE communication should already work on windows. I think SPICE command should be added to some sort global configuration and in "circuits.py" simulate function would read SPICE command from the configuration. timeout from POpen line should also be removed. I think it's now possible to add timeout in thread.join() command in rank_pool function in cgp.py.
If circuit doesn't pass the first SPICE simulation or it's score is much higher than average score in the current generation, it's waste of time do other simulations. It should be reasonable approximation to assign same scores to rest of simulations without running them.
Program still doesn't use all available resources. I have 4-core processor and every core is used only 50-60%. Memory use shouldn't be an issue. I don't know where the time is spent. Maybe waiting for the SPICE to finish?
Simulation options should be moved away from cgp.py to their own file. Plotted graphs and simulation logs should also be moved to a new folder.
Read the blog posts and looked interesting. Any recent updates?
Contraints are functions that are checked against the SPICE output and return True/False if output passes. If output doesn't pass circuits fitness score is increased.
Currently it's not possible to tweak a goal function, their scoring weights or anything else in a running simulation. If simulation parameters are changed simulation needs to be restarted.
We need a program that opens a paused simulation, unpickles it, makes changes and pickles it again.
This is not an issue but an improvement, and it can wait until the development further matures.
It would be great if this were made into a module so that it could be installed.
http://guide.python-distribute.org/creation.html
That way we could run code from any directory.
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.