# N-Queens Problem
import random
# Define size of board
SIZE_OF_BOARD = 8
POPULATION_SIZE = 50
population = []
startingIndividual = []
# Populate starting individual
for x in range(0, SIZE_OF_BOARD):
startingIndividual.append(x)
for x in range(0, POPULATION_SIZE - 1):
population.append(startingIndividual)
for x in population:
random.seed()
random.shuffle(x)
print(population)
所以,当我运行这个程序时,我得到相同的排列50次。即使我为每个列表重新调整了shuffle,我也在洗牌,结果仍然是一样的。我到底哪里错了?