Did I find the right examples for you? yes no

All Samples(44)  |  Call(0)  |  Derive(25)  |  Import(19)

src/r/e/resistance-HEAD/bots/beginners.py   resistance(Download)
# All of the example bots in this file derive from the base Bot class.  See
# how this is implemented by looking at player.py.  The API is very well
# documented there.
from player import Bot 
 
class Paranoid(Bot):
    """An AI bot that tends to vote everything down!"""
 
    def select(self, players, count):
        self.log.info("Picking myself and others I don't trust.")
class Hippie(Bot):
    """An AI bot that's OK with everything!"""
 
    def select(self, players, count):
        self.log.info("Picking some cool dudes to go with me!")
class RandomBot(Bot):
    """An AI bot that's perhaps never played before and doesn't understand the
    rules very well!"""
 
    def select(self, players, count):
class Neighbor(Bot):
    """An AI that picks and votes for its neighbours and specifically does not
    use randomness in its decision-making."""
 
    @property

src/r/e/resistance-HEAD/bots/1/clymily.py   resistance(Download)
import random
 
from player import Bot, Player
 
__all__ = ['Clymily']
class SubsumptionBot(Bot):
    """ Actual strategy is composed from a collection of (priority, condition, action) tuples.
    Behaviors with the same priority, and condition that holds, are picked from randomly. """
 
    @property

src/r/e/resistance-HEAD/bots/1/mp.py   resistance(Download)
"""
 
from player import Bot, Player
from game import State
import random
class Magi(Bot):
    """This is the base class for your AI in THE RESISTANCE.  To get started:
         1) Derive this class from a new file that will contain your AI.  See
            bots.py for simple stock AI examples.
 

src/r/e/resistance-HEAD/bots/1/grumpy.py   resistance(Download)
"""
 
from player import Bot, Player
from game import State
 
class GrumpyBot(Bot):
 
    def __init__(self, game, index, spy):
        """Constructor called before a game starts.  It's recommended you don't
        override this function and instead use onGameRevealed() to perform

src/r/e/resistance-HEAD/server.py   resistance(Download)
 
from competition import CompetitionRunner, CompetitionRound
from player import Player, Bot
from game import Game
 
class ProxyBot(Bot):
 
    def __init__(self, name, client, game, bot):
        self.name = name
        self.client = client

src/r/e/resistance-HEAD/bots/1/pands.py   resistance(Download)
import math
 
from player import Bot 
 
 
 
class PandSBot(Bot):

src/r/e/resistance-HEAD/bots/1/opeth.py   resistance(Download)
"""
 
from player import Bot
from game import State
import random
 
 
class Opeth(Bot):

src/r/e/resistance-HEAD/bots/1/hartbot.py   resistance(Download)
from game import State
from genericpath import exists
from player import Bot
from token import EQUAL
import random
 
class HartBot(Bot):

src/r/e/resistance-HEAD/bots/1/garboa.py   resistance(Download)
import random
 
from player import Bot
import itertools
import logging
import collections
 
class GarboA(Bot):

src/r/e/resistance-HEAD/bots/1/dmq.py   resistance(Download)
"""
 
from player import Bot
from game import *
import random
 
class Bot5Players(Bot):

  1 | 2  Next