Giter Club home page Giter Club logo

spicega's Introduction

SpiceGA

## Introduction SpiceGA is a Python 3 application designed to produce evolved circuits.

This application use a evolutionary algorithm to create an electric circuit who meet the differents constraints specified by the user.During run, many electrical circuits are created and tested, learning to create valids circuit who evolve during generation and atempts to reach the defined objective.

This project use pyspice and ngSPICE to simulate generated circuits, python-deap for the genetic toolsuit.

Installation

dependencies

  • Python >= 3.2
  • ngspice >= 24

Python dependencies

Optional dependencies

  • python3-networkx : useful to generate a genealogy tree resuming the evolution of the simuation

Usage

Define an evaluation function returning a positive ascending fitness comparing the input and the output

def evaluator(inp, outp):
    return (1 / math.sqrt(1 + (abs((inp/3) - outp))))
import spicega

toolbox = deap.base.Toolbox()
toolbox.register("evaluator", evaluator)
s = spicega.SpiceGA(toolbox,
                    nodelist=[-2, -1, 0, 1, 3,],
                    elemlist=[0,1],
                    spice_library=SpiceLibrary('./libraries')))
s.run()

Complete documented example is available in the example_adder.py file

spicega's People

Contributors

neodyme avatar

Stargazers

Artur avatar  avatar  avatar Thibaut Royer avatar

Watchers

Thibaut Royer avatar

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.