-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathmain.py
More file actions
48 lines (39 loc) · 1.22 KB
/
main.py
File metadata and controls
48 lines (39 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"""
A test runner.
HOW TO USE:
1. Create your bot in submissions/yourname_yournetid.py
2. Change the import line to import YOUR bot
3. Run python main.py
"""
from pingv4 import Connect4Game, MinimaxBot, RandomBot
from submissions import template_bot.py # Change this line to import yourname_yournetid.py
def main():
bot = Bot
print("=" * 50)
print(f"Testing Bot: {bot.strategy_name}")
print(f"Author: {bot.author_name} {bot.author_netid}")
print("=" * 50)
print()
# Test 1: Human vs Your Bot
print("Test: Human vs Your Bot")
input("Press Enter to start")
game = Connect4Game(player1=None, player2=Bot)
game.run()
# Uncomment additional tests
# Test 3: Your Bot vs Random Bot
# print("Test: Your Bot vs Random Bot")
# input("Press Enter to start")
# game = Connect4Game(player1=Bot, player2=RandomBot")
# game.run()
# Test 34: Your Bot vs Minimax Bot
# print("Test: Your Bot vs Minimax Bot")
# input("Press Enter to start")
# game = Connect4Game(player1=Bot, player2=MinimaxBot")
# game.run()
# Test 3: Your Bot vs Your Bot
# print("Test: Your Bot vs Your Bot")
# input("Press Enter to start")
# game = Connect4Game(player1=Bot, player2=Bot")
# game.run()
if __name__ == "__main__":
main()