TSP and pathfinding with a genetic algorithm and swarm intelligence