Skip to content

Commit

Permalink
update max k color test
Browse files Browse the repository at this point in the history
test currently has the same number of adjacent nodes of same color as different color
  • Loading branch information
cbhyphen authored Jan 25, 2023
1 parent d9e17c1 commit 9085831
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_fitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ def test_queens():
@staticmethod
def test_max_k_color():
"""Test MaxKColor fitness function"""
edges = [(0, 1), (0, 2), (0, 4), (1, 3), (2, 0), (2, 3), (3, 4)]
edges = [(0, 1), (0, 2), (0, 4), (1, 3), (2, 0), (2, 3), (3, 4), (0, 5)]

state = np.array([0, 1, 0, 1, 1])
assert MaxKColor(edges).evaluate(state) == 3
state = np.array([0, 1, 0, 1, 1, 1])
assert MaxKColor(edges).evaluate(state) == 4

@staticmethod
def test_custom_fitness():
Expand Down

0 comments on commit 9085831

Please sign in to comment.