how making circle moving node to node after Ant colony make decision with probability ?

hello... i have some problem about Ant colony Algorithm, how to calculate the probability ant colony if the decision each node is different, every node just can move four direction, for example ant at node 1 now the ant make decision to choose next node. where : d= [ 0 30 40 20 30 ]
if we have decicion of ant will move next node, how to move that cirle in node 1 to node ant will chose this code for position of the circle
clc
clear all
xnode=[20 50 80 50 50];
ynode=[60 60 60 30 90];
xRobot=[50];
yRobot=[60];
rNode=1
for i=1:5
d=rNode*2;
px = xnode(i)-rNode;
py = ynode(i)-rNode;
h = rectangle ('Position',[ px py d d], 'Curvature',[1,1],'FaceColor','y','EdgeColor','r');
daspect([1,1,1]);
end
rRobot=2;
d=rRobot*2;
px = xRobot-rRobot;
py = yRobot-rRobot;
h = rectangle ('Position',[ px py d d], 'Curvature',[1,1],'FaceColor','b','EdgeColor','b');
daspect([1,1,1]);
if someone who know that problem,please help me,

Answers (0)

Asked:

on 1 Nov 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!