• Create Account

### #Actualprushik

Posted 04 November 2012 - 08:51 PM

It's a competitive neural network model, nothing to do with multi-layered perceptrons. Your application can be seen as a self organizing map,
and is very close to a Kohonen Map. The difference is that you try to build the topology during the learning process, the topology isn't static, that's why I suggested to have a look on Growing Neural Gas. It will explain : how to link/unlink nodes and how to create/destroy nodes.

I do think my topology will be static, I am only creating these nodes and then linking them, once that is finished, the connections and nodes will never change again, I won't create or destroy nodes or unlink them. The map will just be created once in the beginning and then used 'as is' afterwards.
Essentially, traversing the map will be the user's responsibility, if that makes a difference.

Will it be helpful if I post some of my code?

#define MAX_NODES 100
#define GRID_W 50
#define GRID_H 50

struct node
{
int x,y;
};

struct node node[MAX_NODES];

void genMap()
{
//create grid
int grid[GRID_W][GRID_H];

int i,j;

//zero grid
for (i=0;i<GRID_W;i++)
for (j=0;j<GRID_H;j++)
grid[i][j]=0;

//fill grid
for (i=0;i<MAX_NODES;i++)
{
//variable for guesses
int gx,gy;
do
{
gx=rand()%GRID_W;
gy=rand()%GRID_H;
} while (grid[gx][gy]!=0);

grid[gx][gy]=i+1;
node[i].x=gx;
node[i].y=gy;
}

for (i=0;i<MAX_NODES;)
{
//........
}

return;
}



Something like that....

### #2prushik

Posted 04 November 2012 - 08:51 PM

It's a competitive neural network model, nothing to do with multi-layered perceptrons. Your application can be seen as a self organizing map,
and is very close to a Kohonen Map. The difference is that you try to build the topology during the learning process, the topology isn't static, that's why I suggested to have a look on Growing Neural Gas. It will explain : how to link/unlink nodes and how to create/destroy nodes.

I do think my topology will be static, I am only creating these nodes and then linking them, once that is finished, the connections and nodes will never change again, I won't create or destroy nodes or unlink them. The map will just be created once in the beginning and then used 'as is' afterwards.
Essentially, traversing the map will be the user's responsibility, if that makes a difference.

Will it be helpful if I post some of my code?

#define MAX_NODES 100
#define GRID_W 50
#define GRID_H 50

struct node
{
int x,y;
};

struct node node[MAX_NODES];

void genMap()
{
//create grid
int grid[GRID_W][GRID_H];

int i,j;

//zero grid
for (i=0;i<GRID_W;i++)
for (j=0;j<GRID_H;j++)
grid[i][j]=0;

//fill grid
for (i=0;i<MAX_NODES;i++)
{
//variable for guesses
int gx,gy;
do
{
gx=rand()%GRID_W;
gy=rand()%GRID_H;
} while (grid[gx][gy]!=0);

grid[gx][gy]=i+1;
node[i].x=gx;
node[i].y=gy;
}

for (i=0;i<MAX_NODES;)
{
//........
}

return;
}



Something like that....

### #1prushik

Posted 04 November 2012 - 08:45 PM

It's a competitive neural network model, nothing to do with multi-layered perceptrons. Your application can be seen as a self organizing map,
and is very close to a Kohonen Map. The difference is that you try to build the topology during the learning process, the topology isn't static, that's why I suggested to have a look on Growing Neural Gas. It will explain : how to link/unlink nodes and how to create/destroy nodes.

I do think my topology will be static, I am only creating these nodes and then linking them, once that is finished, the connections and nodes will never change again, I won't create or destroy nodes or unlink them. The map will just be created once in the beginning and then used 'as is' afterwards.
Essentially, traversing the map will be the user's responsibility, if that makes a difference.

Will it be helpful if I post some of my code?

#define MAX_NODES 100
#define GRID_W 50
#define GRID_H 50

struct node
{
int x,y;
};

struct node node[MAX_NODES];

void genMap()
{
//create grid
int grid[GRID_W][GRID_H];

int i,j;

//zero grid
for (i=0;i<GRID_W;i++)
for (j=0;j<GRID_H;j++)
grid[i][j]=0;

//fill grid
for (i=0;i<MAX_NODES;i++)
{
//variable for guesses
int gx,gy;
do
{
gx=rand()%GRID_W;
gy=rand()%GRID_H;
} while (grid[gx][gy]!=0);

}