TEG_programistyczne/zdominowana.py

12 lines
482 B
Python
Raw Permalink Normal View History

2019-11-12 20:24:27 +01:00
from teg import dominuje
2019-11-11 18:56:56 +01:00
def zdominowana(player, strategy, payment_matrix_one, payment_matrix_two):
for i in range(0,len(payment_matrix_one if player == 1 else payment_matrix_two[0])):
strategy_check = [0 for p in strategy]
strategy_check[i] = 1
if( strategy == strategy_check ):
continue
2019-11-12 20:24:27 +01:00
if( dominuje(player, strategy_check, strategy, payment_matrix_one, payment_matrix_two ) == True ):
2019-11-11 18:56:56 +01:00
return True
return False