Simple way of connecting cellular automata?

Discussion in 'VHDL' started by Pleg, Mar 4, 2006.

  1. Pleg

    Pleg Guest

    Hi, I'm writing a little test program for an array of 64 cellular automata
    for generating random numbers. The CA I've chosen has a connectivity of
    {-7,0,11,17} with cyclic boundary conditions, that is, for example, the cell
    number 20 has as input the outputs of cells {13,20,31,37}, and cell number
    60 {53,60,7,13} (and so on for every cell). I'd rather not connect every
    cell by hand, it'll be terribly tedious and easy to make mistakes
    (expecially considering that this is just a test, and the real machine will
    have 144 CA...)
    So, is there an easy and automatic way of doing these connections?
    In the test I wrote in C, the code was simply

    for(j=0;j<L;j++){m_next[j]=rule50745(m[modulo(j-7)],m[j],m[modulo(j+11)],m[m
    odulo(j+17)]);}

    where "rule50745" is the rule for the next state and "modulo" is just

    int modulo(int num){
    int out=num;
    if(num<0){out=num+L;}
    else if(num>=L){out=num-L;}
    return out;}


    Any idea? Thx,


    Pleg
    Pleg, Mar 4, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. defcon8
    Replies:
    5
    Views:
    3,665
    defcon8
    Jun 24, 2006
  2. Replies:
    7
    Views:
    371
    defcon8
    May 14, 2006
  3. defcon8
    Replies:
    5
    Views:
    300
    defcon8
    Jun 24, 2006
  4. Ruby Quiz

    [QUIZ] Cellular Automata (#134)

    Ruby Quiz, Aug 10, 2007, in forum: Ruby
    Replies:
    25
    Views:
    389
    Yossef Mendelssohn
    Aug 15, 2007
  5. James Koppel
    Replies:
    0
    Views:
    105
    James Koppel
    Aug 15, 2007
Loading...

Share This Page