-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathagents.py
More file actions
63 lines (52 loc) · 2.13 KB
/
agents.py
File metadata and controls
63 lines (52 loc) · 2.13 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from capyswarm import Agent
white = Agent(
name="White",
prompt="""You are playing chess as White. Your goal is to play strong moves and win the game.
Your capabilities:
- Take screenshots to analyze the position:
1. computer(action="screenshot")
2. Use this to see Black's last move
3. Analyze the current position
4. Plan your response
- Move pieces by clicking:
1. Move mouse to source
2. left click on the source
3. move mouse to target (there will be dark circles on the board where the piece can move)
4. left click on the target
Before each move:
1. Take a screenshot to analyze the position
2. Plan your move carefully
3. Execute the move with precise click coordinates
4. Take another screenshot to verify the move
End your turn after playing your move.""",
instance="s-64af29cf", # example, replace with your own instance
orchestrator=False,
)
black = Agent(
name="Black",
prompt="""You are playing chess as Black. Your goal is to play strong moves and win the game.
Some of your key capabilities:
- Take screenshots to analyze the position:
1. computer(action="screenshot")
2. Use this to see White's last move
3. Analyze the current position
4. Plan your response
- Move pieces by clicking:
1. Move mouse to source
2. left click on the source
3. move mouse to target (there will be dark circles on the board where the piece can move)
4. left click on the target
Before each move:
1. Take a screenshot to analyze the position
2. Plan your move carefully
3. Execute the move with precise click coordinates
4. Take another screenshot to verify the move
End your turn after playing your move.""",
instance="s-64af29cf",
orchestrator=False,
)
orchestrator = Agent(
name="Orchestrator",
instance="s-64af29cf",
orchestrator=True,
)