Giter VIP home page Giter VIP logo

try_signalling's People

Contributors

baliuzeger avatar

Watchers

 avatar

try_signalling's Issues

consider RunningSet::new by "moving the var out & in".

benefit:

  • avoid network communication between original data & running thread caused by the mechanism of Mutex.
  • keep RunningSet::new simple (not adding more functions when having more run-modes), i.e. let the "body" (where the soul can go out & in) generate closure & insert into RunningSet.

avoid redundant type annotation for connections

can try associated type.

pub trait PassiveConnection<S0: Send, S1: Send>
to
pub trait PassiveConnection {type S0; type S1;}

pub type ConnectionComponentS1<G, A> = ConnectionComponent<G, A, FwdPreS1, FwdPostS1>;
to
pub type ConnectionComponentS1<G, A> = ConnectionComponent<Generator<S0=FwdPreS1>, Acceptor<S1=FwdPostS1>>;

pub struct ConnectionComponent<G: Send + ?Sized, A: Send + ?Sized, R: Send, S: Send>
to
pub struct ConnectionComponent<G: Generator + Send + ?Sized, A: Acceptor + Send + ?Sizedd>

synapses must config_channels before all neurons.

synapses need to check the mode of pre & post synapse neuron to decide whether to run.
Therefore, if some neurons config_channels before synapses,
those neurons may get signal channels which the correspondent synapses won't run.

passive_sync_chs_sets may be locked by passive_running_populations

due to the need to access the Passive Agents, passive_sync_chs_sets may be locked by passive_running_populations.

Possible solutions:

  1. let OutCoponents hold passive_sync_chs_sets when config_channels.
  2. not use Mutex anymore; make a copy (like phantom) when run then merge back after running.
  3. let passive_running_sets wait some time. (not really fix the problem.)
  4. get sync_chs_sets by message passing.....!? seems don't work...

more connection possibilities to be implemented

Active_Multi_Out to Active_Multi_Out not implemented yet:
need modify Multi_In/Out_Component.

SingleOut to PassiveSingleOut not implemented yet:
need modify Single_In/Out_Component & passive_device run().

Consider using Actor Model

Consider using actor model for performance / distributed run / avoiding complicated error handling when config.

passive running set of neurons should be separated by types of signals

passive running set of neurons should be separated by types of signals.
in case that a neuron can have different actions to types of acceptors when firing, this feature can avoid redundant message passing of confirm/report.

There should be a enum GeneratedSignal of types of signals a neuron has.
the running set of neurons should be hashtable of GeneratedSignal-acceptor_group,
device.evolve should return a vector/iterator of GeneratedSignal,
the device.run use it to decide which groups need Broadcast::FinishCycle.

Need some way to avoid duplicate similar code of agent's init running connections.

`{

code below
code below
code below

// here

fn run(&mut self, rx_confirm: CCReceiver, tx_report: CCSender) {
let mut running_connections = Vec::new();
for conn in &self.out_connections_1 {
let running_conn = conn.connection.upgrade().unwrap();
let (tx_conn_report, rx_conn_report) = crossbeam_channel::bounded(1);
let (tx_conn_confirm, rx_conn_confirm) = crossbeam_channel::bounded(1);
running_connections.push(RunningSet {
instance: thread::spawn(move || {running_conn.lock().unwrap()
.run_under_agent(rx_conn_confirm, tx_conn_report)}),
report: rx_conn_report,
confirm: tx_conn_confirm,
});
}
// failed to use a function of init_connections
for conn in &self.out_connections_2 {
let running_conn = conn.connection.upgrade().unwrap();
let (tx_conn_report, rx_conn_report) = crossbeam_channel::bounded(1);
let (tx_conn_confirm, rx_conn_confirm) = crossbeam_channel::bounded(1);
running_connections.push(RunningSet {
instance: thread::spawn(move || {running_conn.lock().unwrap()
.run_under_agent(rx_conn_confirm, tx_conn_report)}),
report: rx_conn_report,
confirm: tx_conn_confirm,
});
}`

need functionality of display network information under 2 modes.

1 is population level: show the relationships between populations,
e.g. neuron-population-0 all-to-all neuron-population-1.

1 is device level,
e.g. neuron-population-0, device # 1, connect to :
connection-population-0, device # 10,
recorder-population-0, device # 1,

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.