Lyte commited on
Commit
33e4e70
·
verified ·
1 Parent(s): 39f266a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -13
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.5a"),
10
  filename=os.environ.get("MODEL_FILE", "unsloth.Q8_0.gguf"),
11
  ),
12
  n_ctx=16384
13
  )
14
 
15
- SYSTEM_PROMPT = """You are an expert Connect Four player. The game is played on a 6x7 grid where pieces fall to the lowest available position in each column due to gravity.
16
 
17
- Board representation:
18
- - The board is described as a list of occupied positions in the format: <column><row>(<piece>).
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 simply represented by an empty list.
22
- - To win, you must connect 4 of your pieces horizontally, vertically, or diagonally.
23
 
24
- Respond in the following XML format:
 
 
 
 
 
 
25
  <reasoning>
26
- Explain your reasoning, including:
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
- Indicate the column letter (a-g) where you want to drop your piece.
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 (ag) for your next move.
35
  </move>
36
  """
37