Choose 20 random columns to start
100000.times do
calculate the sums of each row
if solution is found
store/ouptut the matrix
else
randomly choose one of the rows that is below threshold
find the column with the smallest value in that row
swap it out with a random column from the pool
endif
end #loop
You are not logged in, either login or create an account to post comments
posted by losvedir at 6:32 AM on June 14