house :: centrist.py

This bot has played 2374 games (377 wins / 27 draws / 1970 losses).

Play against this bot as X or as O.

These bots have done best aganist centrist.py...

Bot P W D L Points Size From beginner One hit wonder Goldfish
Jon Bannister : : anybot_r282.py (v5) 10 10 0 0 10 974 False False True
Dan Miller : : board_bot.py 10 10 0 0 10 596 False False False
Dilwoar Hussain : : dee-bot.py (v12) 10 10 0 0 10 306 False False False
Daniel Patrick : : error_unable_to_connect4.py (v2) 10 10 0 0 10 757 False False True
Ian Ozsvald : : ian12.py 10 10 0 0 10 943 False False True

...and these bots have done worst

Bot P W D L Points Size From beginner One hit wonder Goldfish
house : : anarchist.py 10 3 0 7 -4 None None None None
house : : opportunist.py 10 2 0 8 -6 None None None None
James Campbell : : horrible.py (v4) 10 0 0 10 -10 246 False False True
Ronan Murphy : : loser.py 10 0 0 10 -10 105 False False True
Peter Inglesby : : random.py 10 0 0 10 -10 26 False True True

All standings against centrist.py

The code

      
# This bot picks the most central available move.

from botany_connectfour import game


def get_next_move(board):
    available_moves = game.available_moves(board)
    mid_point = len(available_moves) // 2
    return available_moves[mid_point]