Re: TSP in CL &/or Screamer
- From: js@xxxxxxxxxxxxxx
- Date: 11 Jul 2005 11:43:25 -0700
Drew Krause schrieb:
> Hello, I've been searching for Lisp code to the Traveling Salesman
> Problem, but it looks like this problem might be a favorite classroom
> assignment -- so no luck.
>
> I'm more interested in using the algorithm than the (undoubtedly worthy)
> exercise of developing it. In particular, I'd like to add a constraint
> that allows me to choose the starting and ending 'cities'.
>
> Any help appreciated. Thanks!
Yes this is indeed a common classroom assignment. I've developed and
used TSP optimizers in CL using genetic algorithms (GA), simulated
annealing (SA) and treshold accepting (TA). The most difficult part
using genetic algorithms here is to make them running non-consing per
generation. SA or TA are easier to implement and works quite well for
the TSP. TA is, in my personal experience, faster and leads to better
results than SA. As mutation operator (in TA and GA) I either reversed
a randomly chosen segment of the path or swapped the positions of two
cities in the whole path (both operations chosen randomly per
generation). For the crossover in GA I used the so called
"order-crossover" which crosses two paths by randomly selecting
segments in both, applying the order constraints in those segments to
the other path and fix up both paths by removing double cities from the
end. I wrote a CAPI user interface around all those stuff so that I
can view the progress of the optimization and to manually choose
different parameters using sliders while the optimization is running.
I hope this is of any help to you,
ciao,
Jochen Schmidt
.
- References:
- TSP in CL &/or Screamer
- From: Drew Krause
- TSP in CL &/or Screamer
- Prev by Date: Re: How to create a standalone GNU/Linux binary using SBCL?
- Next by Date: Re: How to create a standalone GNU/Linux binary using SBCL?
- Previous by thread: Re: TSP in CL &/or Screamer
- Next by thread: a working lisp telnetd?
- Index(es):
Relevant Pages
|