void algo(){
		   boolean loop =true;
		   while(loop){
			  // System.out.println(openList.size());
			   if (openList.isEmpty()) {
					System.out.println("Failure: Openlist contains no more nodes");
					loop = false;
				}else{
					T copyNode =  (T) openList.get(0);                 
					T bestNode = cR.clone(copyNode);
					    
					openList.remove(0);//

					closedList.add(bestNode);
					
					if(bestNode.equals(goalNode)){
						loop=false;
						System.out.println("Solution reached");
						printPath(bestNode);
					}else{
						Vector<T> children = new Vector<>(0);
						children=cR.getChildren(bestNode);
						Iterator<T> id = children.iterator();
						
						while(id.hasNext()){
							T child = (T) id.next();
							boolean permission= isNotOnLists(child,openList, closedList);
							
							
							if(permission){
								
									
								int g = (int) gValues.get(bestNode)+cR.g(bestNode, child);
								gValues.put(child, g);
								
								parent.put(child, bestNode);

								double childMan = f(child);
							
								int childIndex=0;
								Iterator<T> addList = openList.iterator();
								while (addList.hasNext()) {
									T out = (T) addList.next();
									
									if(f(out)<childMan){
										
										childIndex++;
									}
								}
								openList.add(childIndex, child);
								
							}
	
						}
					}
			
				}
			   
		   }
		   
	   }