Exemplo n.º 1
0
from ffai.ai.competition import Competition
import examples.scripted_bot_example
import examples.grodbot
from copy import deepcopy
from ffai.core.load import get_team, get_rule_set, get_config

config = get_config('ff-11.json')

# Random vs. random
competition = Competition('MyCompetition',
                          competitor_a_team_id='human-1',
                          competitor_b_team_id='human-2',
                          competitor_a_name='random',
                          competitor_b_name='random',
                          config=config)
results = competition.run(num_games=2)
results.print()
'''
# Random vs. idle
config.time_limits.game_time_limit = 10  # 10 second time limit per game
config.time_limits.turn_time_limit = 1  # 1 second time limit per turn
competition = Competition('MyCompetition', competitor_a_team_id='human-1', competitor_b_team_id='human-2', competitor_a_name='random', competitor_b_name='idle', config=config)
results = competition.run(num_games=2)
results.print()

# Random vs. violator
config.time_limits.game_time_limit = 60  # 60 second time limit per game
config.time_limits.turn_time_limit = 1  # 1 second time limit per turn
config.time_limits.opp__time_limit = 1  # 1 second time limit per opponent choice
config.time_limits.violation_threshold = 1  # 1 violation limit 
competition = Competition('MyCompetition', competitor_a_team_id='human-1', competitor_b_team_id='human-2', competitor_a_name='random', competitor_b_name='violator', config=config)
Exemplo n.º 2
0
import simplebot  # Replace with the name our your module
from ffai.ai.competition import Competition
from ffai.core.load import get_config

config = get_config('ff-11-bot-bowl-i.json')
competition = Competition(
    name='MyCompetition',
    competitor_a_team_id='human-1',
    competitor_b_team_id='human-2',
    competitor_a_name='simplebot',  # Replace 'simplebot' with your bot name
    competitor_b_name='random',
    config=config)
results = competition.run(num_games=2)
results.print()
Exemplo n.º 3
0
#!/usr/bin/env python3

from ffai.ai.competition import Competition
import examples.scripted_bot_example
import examples.grodbot
from copy import deepcopy
from ffai.core.load import get_team, get_rule_set, get_config
import noone.a2c_agent

# Load competition configuration for the bot bowl
config = get_config('ff-11-bot-bowl-i.json')

# scripted vs. random
competition = Competition('MyCompetition',
                          competitor_a_team_id='human-1',
                          competitor_b_team_id='human-2',
                          competitor_a_name='scripted',
                          competitor_b_name='random',
                          config=config)
results = competition.run(num_games=2)
results.print()

# Random vs. Random
competition = Competition('MyCompetition',
                          competitor_a_team_id='human-1',
                          competitor_b_team_id='human-2',
                          competitor_a_name='random',
                          competitor_b_name='grodbot',
                          config=config)
results = competition.run(num_games=2)
results.print()
Exemplo n.º 4
0
from ffai.ai.competition import Competition, Competitor
import examples.scripted_bot_example
from copy import deepcopy
from ffai.core.load import get_team, get_rule_set, get_config

config = get_config('ff-11.json')
ruleset = get_rule_set(config.ruleset)
team1 = get_team('human-1', ruleset)
team2 = get_team('human-2', ruleset)
competitor_random = Competitor('random', deepcopy(team1))
competitor_scripted = Competitor('scripted', deepcopy(team2))
competition = Competition('MyCompetition',
                          competitor_random,
                          competitor_scripted,
                          config=config)
results = competition.run(num_games=20)
results.print()