Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,30 +6,32 @@ import numpy as np
|
|
6 |
|
7 |
model = Llama(
|
8 |
model_path=hf_hub_download(
|
9 |
-
repo_id=os.environ.get("REPO_ID", "Lyte/QuadConnect2.5-0.5B-v0.0.
|
10 |
filename=os.environ.get("MODEL_FILE", "unsloth.Q8_0.gguf"),
|
11 |
),
|
12 |
n_ctx=16384
|
13 |
)
|
14 |
|
15 |
-
SYSTEM_PROMPT = """You are
|
16 |
|
17 |
-
Board
|
18 |
-
-
|
19 |
-
- Columns are labeled a-g (from left to right) and rows are numbered 1-6 (with 1 as the bottom row).
|
20 |
- For example: 'a1(O), a2(X), b1(O)' indicates that cell a1 has an O, a2 has an X, and b1 has an O.
|
21 |
-
- An empty board is
|
22 |
-
-
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
<reasoning>
|
26 |
-
Explain your
|
27 |
-
- Identifying winning opportunities for yourself.
|
28 |
-
- Blocking your opponent's potential wins.
|
29 |
-
- Strategic positioning, such as center control and setting up future moves.
|
30 |
</reasoning>
|
31 |
<move>
|
32 |
-
|
33 |
</move>
|
34 |
"""
|
35 |
|
|
|
6 |
|
7 |
model = Llama(
|
8 |
model_path=hf_hub_download(
|
9 |
+
repo_id=os.environ.get("REPO_ID", "Lyte/QuadConnect2.5-0.5B-v0.0.5b"),
|
10 |
filename=os.environ.get("MODEL_FILE", "unsloth.Q8_0.gguf"),
|
11 |
),
|
12 |
n_ctx=16384
|
13 |
)
|
14 |
|
15 |
+
SYSTEM_PROMPT = """You are a master Connect Four strategist whose goal is to win while preventing your opponent from winning. The game is played on a 6x7 grid (columns a–g, rows 1–6 with 1 at the bottom) where pieces drop to the lowest available spot.
|
16 |
|
17 |
+
Board:
|
18 |
+
- Represented as a list of occupied cells in the format: <column><row>(<piece>), e.g., 'a1(O)'.
|
|
|
19 |
- For example: 'a1(O), a2(X), b1(O)' indicates that cell a1 has an O, a2 has an X, and b1 has an O.
|
20 |
+
- An empty board is shown as 'Empty Board'.
|
21 |
+
- Win by connecting 4 pieces in any direction (horizontal, vertical, or diagonal).
|
22 |
|
23 |
+
Strategy:
|
24 |
+
1. Identify taken positions, and empty positions.
|
25 |
+
2. Find and execute winning moves.
|
26 |
+
3. If There isn't a winning move, then block your opponent’s potential wins.
|
27 |
+
4. Control the center and set up future moves.
|
28 |
+
|
29 |
+
Respond in XML:
|
30 |
<reasoning>
|
31 |
+
Explain your thought process, focusing on your winning move, how you block your opponent, and your strategic plans.
|
|
|
|
|
|
|
32 |
</reasoning>
|
33 |
<move>
|
34 |
+
Specify the column letter (a–g) for your next move.
|
35 |
</move>
|
36 |
"""
|
37 |
|