Coder Social home page Coder Social logo

evolutionary-circuits's People

Contributors

pbharrin avatar ttl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evolutionary-circuits's Issues

OSError: too many open files

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.

Windows support

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.

Fitness score approximation for bad circuits

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.

Slow multithreading

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?

Better code structure

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.

Constraints

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.

Way to change simulation parameters of running simulation

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.