Swarm Circuit Performing Optimization and Inverse Problems