views:

32

answers:

0
heli_link_dis(h1,b1,800).   
heli_link_dis(h1,b3,1400).  
heli_link_dis(h1,b2,600).  
heli_link_dis(h1,b8,1200).  
heli_link_dis(h2,b4,400).  
heli_link_dis(h2,b3,2000).  
heli_link_dis(h2,b5,500).  
heli_link_dis(h3,b5,1000).  
heli_link_dis(h3,b6,400).  

heli_link_dis = helicopter linked distance
h1 mean the name of a helicopter
b1 means the name of a base station
800 is the distance between helicopter and the base station

i need the prolog code to trace the closest helicopter to a given base station