3 ms·
OK, I will try it. And if you had said that it would be almost impossible, because there are too many local minima, I would have believed you. A serious try wi
by daivd 16y ago
OK, I will try it. And if you had said that it would be almost impossible, because there are too many local minima, I would have believed you.
A serious try with GA would require abandoning Python for a faster fitness function in C, that does not copy dozens of lists back and forth. I estimate that just about anyone could make it more than 100 times as fast. The slow implementation will have to suffice for now.
The interesting part is of course not the absolute times, but if the complexity scales differently. If a real Sudoku solver takes about 50 times as long to solve that problem, I will consider it a victory if the GA does the same.
- bryanh 16y agoAs a quick fix, check out Psyco. I've had success running algorithms in Python up to 6-8x faster.