You are viewing a single comment's thread from:

RE: The Ai Contest #1 - Non-programmers welcome

in #aicontest7 years ago
from Game.Player import Player
from Game.Context import Context
from Game.Bet import Bet


class T4TPlayer(Player):
    def __init__(self, name):
        super(T4TPlayer, self).__init__(name)
        self.wealth_before = None

    def getSteemUser(self):
        return "@laxam"

    def think(self, context):
        cooperative = self.wealth_before and self.wealth_before <= self.wealth - 10
        bet = Bet.TEN if cooperative else Bet.NOTHING
        self.wealth_before = self.wealth
        return bet

Tit-for-tat. Gives if previous round was profitable, takes otherwise.

Sort:  

Nice and efficient. Time will tell if this is efficient :)

Coin Marketplace

STEEM 0.24
TRX 0.21
JST 0.036
BTC 97455.52
ETH 3338.22
USDT 1.00
SBD 3.34