MAKING AUTONOMOUS ROBOTIC AGENTS MORE EFFECTIVE BY IMITATING NATURE ------------------------------------------------------------------- Prashant Bhattacharji Roll Number : 02EG1016 Indian Institute of Technology , Kharagpur Background: In this project , I have experimented and analyzed , how autonomous robotic agents can be made more effective by imitating the natural behaviour of various organisms . I have essentially experimented with two ideas : 1) The way in which predators ' encircle in ' on their prey and . 2) Extending the idea of Swarm Intelligence in teams of Asynchronous Robots . Also , the idea of Randomization in making decisions is used freely ... as is the case in Nature when we rarely find organisms making well defined and completely predictable decisions . The implementation and simulation of the ideas was done using the IBM Robocode Simulator . In this case , there was no definite function f(x,y...) to be optimized . The aim was to test the effectiveness of these ideas on the behaviour of Robots . About Robocode : The IBM Robocode is a simulator for Mobile Robots , in which Robots , having certain capabilites , have to battle in teams or as individuals . This allows us to program and analyze various strategies for the motion and behaviour of Robots . 1) 'ENCIRCLER' This is a simple but reasonably effective Robot on which I experimented with the idea of 'encircling ' around the prey . Also , while encircling and attacking the prey , the robot frequently changes its direction . When it encirlces its prey , on observing its prey , it fires bullets at a randomly selected offset angle of small magnitude , away from the current position of the prey-robot . This is because the prey-robot will (most probably) be in motion and the by the time the bullet reaches the robot , the position of the robot may have changed slightly . So by firing bullets at small but random offset angles , we ensure that the prey is kind of enclosed by a layer of bullets around it . 2) 'SWARM INTELLIGENCE' IN MAKING TEAMS OF ROBOTS MORE EFFECTIVE Consider a situation where a team of robots has to be controlled to unitedly react to a certain situation . Here we may essentially have two particular case : 1) A team of Synchronous robotic agents which operate under the instructions of a common Team-Leader 2) A team of Asynchronous / Autonomous robotic agents , in which all the agents behave independantly . The idea of ' Swarm Intelligence ' : In this , the agents are asynchronous , however , the observe the motion and behaviour of the agents around them and move accordingly . Let us consider three vectors : V1) An agent will always try to move backwards , if it gets too close to another agent or has collided with another agent . Thus consider a vector , directed backwards , from the direction of the closest agent into which the agent under consideration may collide . V2) The 'pbest' value is the best value of the health ever attained by an agent . Thus consider a vector , directed from the current position of the agent , towards the position where 'pbest' occured. V3) The 'gbest' value is the global best , which has been attained by any of the agents of the team . Consider a vector , directed from the current position of the agent , towards the position where 'gbest' occured . At any instant , let the velocity of the agent change to a velocity dependant on : his current Velocity , and the vectors given by (1),(2) and (3) above with randomly assigned weights . This allows the agents to continue exploring the arena , as well as move to spots where their presence is more suitable. In a team of SYNCHRONOUS Agents , the problem may arise , that in the absence of a leader , or communication from the leades , the agents may not know how to react to the situation . We consider Three Teams of Robotic Agents , having the following characteristics : 1) Team A -- This is a SYNCHRONOUS team . The entire team turns its guns and begins shooting at a particular opponent robot , at the instruction of the Team Leader . ( 'MyFirstTeam' ) 2) Team B -- This team DOES NOT HAVE A LEADER . The robots move toward random points , irrespective of the behaviour of their team-mates . ( 'ExperiRandom' ) 3) Team C -- This team is ASYNCHRONOUS . The robots however , have been programmed to emulate the basic aspects of swarm intelligence , as explained previously . ( 'Experimental') ----------------- It is important to note that in this particular situation , we do not have a precise function f(x,y...) to be optimized . We could have taken f(x) to be the health of a robot at a particular instant . However , as the game proceeds in this case , the health of the robots keeps on decreasing as they fire bullets , bang into walls , etc . Thus , directly using the Health/Energy to evaluate gbest and pbest cannot be applied in this particular case . Thus I extend the idea of gbest and pbest in the following manner , with slight modification : a) gbest for Agent X is defined as the maximum value of ( Energy of Team Mate Visible at Time t1)/(Energy of X at time t1) . i.e. ... gbest denotes the position of a relatively strong team-mate. b) pbest for Agent X is defined as the maximum value of (Energy of Agent X at time t1)/(Energy of Visible Opponent of X at time t1) .. i.e. pbest denotes the position of a relatively weak opponent . In this , gbest and pbest will increase , but they need not converge as in the case of a function to be optimized . The situation in the arena is continuously changing , and gbest and pbest are essentially to guide the motion of the robot at the instant . A large set of matches / simulations are played between teams A , B , C . ( The scores , and programs for the robots are attached later in the document ) . ----------------- Observations : Team C performs the best , followed by Team B . Team A performs the worst . Analysis : Team A performs the worst , because , once the Team Leader is killed , the agents have no means to coordinate their motion as a team . In Team B , there is no leader . The agents basically head in random directions . This may result in the presence of a large number of agents in undesirable / dangerous spots , thus reducing the effectiveness of the team . In Team C , the direction of motion is oriented : Away from any robot which is too close - This prevents collision between robots . 'gbest' causes team-mates to somewhat group around stronger team-mates . Thus , if a team-member X is in a safe position and thus has greater health/energy , its other team mates will also gradually gather near it . 'pbest' causes agents to go and attack their weaker opponents first . In Team C since the Robots have a vector component towards their stronger teammate , thus they have a greater tendency to cluster in safer spots . Scores for Three Simulations : 1st: Team: pb.ExperimentalTeam 27257 22600 1050 3143 420 43 0 4 2 0 2nd: Team: pb.ExperiRandomTeam 19857 16800 210 2527 280 39 0 1 0 3 3rd: Team: sampleteam.MyFirstTeam 12535 10950 0 1457 125 2 0 0 3 0 4th: Team: sampleteam.MyFirstTeam 10765 9100 0 1531 129 4 0 0 1 2 5th: Team: sampleteam.MyFirstTeam 10303 8800 0 1435 63 3 0 0 0 0 6th: pez.micro.Aristocles 0.3.4 927 500 0 245 20 160 0 0 0 0 1st: Team: pb.ExperimentalTeam 24865 20850 1470 2236 228 35 43 4 0 1 2nd: Team: pb.ExperiRandomTeam 23169 19300 630 2903 296 39 0 1 5 0 3rd: Team: sampleteam.MyFirstTeam 12501 10550 0 1784 164 2 0 0 0 2 4th: Team: sampleteam.MyFirstTeam 9969 8650 0 1221 98 0 0 0 1 2 5th: Team: sampleteam.MyFirstTeam 8885 7450 0 1324 111 0 0 0 1 0 6th: pez.micro.Aristocles 0.3.4 2566 1900 0 380 20 234 31 0 0 0 1st: Team: pb.ExperimentalTeam 25113 20850 1680 2342 200 40 0 4 2 0 2nd: Team: pb.ExperiRandomTeam 23634 19750 210 3241 392 40 0 1 2 2 3rd: Team: sampleteam.MyFirstTeam 12771 10950 0 1598 213 9 0 0 1 0 4th: Team: sampleteam.MyFirstTeam 10107 9000 0 1042 61 3 0 0 1 2 5th: Team: sampleteam.MyFirstTeam 8362 6650 0 1555 154 2 0 0 0 1 6th: pez.micro.Aristocles 0.3.4 1913 1550 0 210 0 122 30 0 0 0