Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Bugfix fuer zweite Evaluation #115

Merged
merged 1 commit into from
Dec 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions chillow/controller/ai_evaluation_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ def __generate_ais_for_first_evaluation(self, player_count: int, players: List[P
self._ais.append(RandomAI(players[5], randint(1, 3)))

def __generate_ais_for_second_evaluation(self, player_count: int, players: List[Player]) -> None:
used_ais = []
used_ai_indices = []
for i in range(player_count):
ai_index = randint(0, len(best_ais_configurations) - 1)
# Prevent that the same AI configuration is used in one game
while ai_index in used_ais:
while ai_index in used_ai_indices:
ai_index = randint(0, len(best_ais_configurations) - 1)

used_ais.append(used_ais)
used_ai_indices.append(ai_index)
ai = best_ais_configurations[ai_index]
self._ais.append(globals()[ai[0]](players[i], *ai[1]))

Expand Down