kaggle-environments 1.14.5__py2.py3-none-any.whl → 1.14.7__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kaggle-environments might be problematic. Click here for more details.
- kaggle_environments/__init__.py +1 -1
- kaggle_environments/envs/llm_20_questions/llm_20_questions.js +3 -2
- kaggle_environments/envs/llm_20_questions/llm_20_questions.py +15 -4
- {kaggle_environments-1.14.5.dist-info → kaggle_environments-1.14.7.dist-info}/METADATA +1 -1
- {kaggle_environments-1.14.5.dist-info → kaggle_environments-1.14.7.dist-info}/RECORD +9 -9
- {kaggle_environments-1.14.5.dist-info → kaggle_environments-1.14.7.dist-info}/LICENSE +0 -0
- {kaggle_environments-1.14.5.dist-info → kaggle_environments-1.14.7.dist-info}/WHEEL +0 -0
- {kaggle_environments-1.14.5.dist-info → kaggle_environments-1.14.7.dist-info}/entry_points.txt +0 -0
- {kaggle_environments-1.14.5.dist-info → kaggle_environments-1.14.7.dist-info}/top_level.txt +0 -0
kaggle_environments/__init__.py
CHANGED
|
@@ -90,7 +90,7 @@ async function renderer(context) {
|
|
|
90
90
|
|
|
91
91
|
const info = environment.info;
|
|
92
92
|
const team1_text = info?.TeamNames?.[0] || "Team 1";
|
|
93
|
-
const team2_text = info?.TeamNames?.[
|
|
93
|
+
const team2_text = info?.TeamNames?.[2] || "Team 2";
|
|
94
94
|
|
|
95
95
|
const ctx = canvas.getContext("2d");
|
|
96
96
|
const padding = 20;
|
|
@@ -112,12 +112,13 @@ async function renderer(context) {
|
|
|
112
112
|
|
|
113
113
|
// Keyword Row
|
|
114
114
|
ctx.fillText("Keyword: " + state[1].observation.keyword, label_x, line_height * line);
|
|
115
|
+
ctx.fillText("Round: " + Math.floor(step / 3 + 1), team2_x, line_height * line);
|
|
115
116
|
|
|
116
117
|
line += 2;
|
|
117
118
|
|
|
118
119
|
// Team Row
|
|
119
120
|
ctx.fillText(team1_text, team1_x, line_height * line);
|
|
120
|
-
ctx.fillText(team2_text, team2_x, line_height *line);
|
|
121
|
+
ctx.fillText(team2_text, team2_x, line_height * line);
|
|
121
122
|
|
|
122
123
|
line++;
|
|
123
124
|
|
|
@@ -42,7 +42,7 @@ alts = keyword_obj["alts"]
|
|
|
42
42
|
def guesser_agent(obs):
|
|
43
43
|
info_prompt = """You are playing a game of 20 questions where you ask the questions and try to figure out the keyword, which will be a real or fictional person, place, or thing. \nHere is what you know so far:\n{q_a_thread}"""
|
|
44
44
|
questions_prompt = """Ask one yes or no question."""
|
|
45
|
-
guess_prompt = """Guess the keyword. Only respond with the exact word/phrase. For example, if you think the keyword is [paris], don't respond with [I think the keyword is paris] or [Is the
|
|
45
|
+
guess_prompt = """Guess the keyword. Only respond with the exact word/phrase. For example, if you think the keyword is [paris], don't respond with [I think the keyword is paris] or [Is the keyword Paris?]. Respond only with the word [paris]."""
|
|
46
46
|
|
|
47
47
|
q_a_thread = ""
|
|
48
48
|
for i in range(0, len(obs.answers)):
|
|
@@ -87,6 +87,8 @@ def answerer_agent(obs):
|
|
|
87
87
|
agents = {GUESSER: guesser_agent, ANSWERER: answerer_agent}
|
|
88
88
|
|
|
89
89
|
def guesser_action(active, inactive, step):
|
|
90
|
+
inactive.observation.keyword = keyword
|
|
91
|
+
inactive.observation.category = category
|
|
90
92
|
guessed = False
|
|
91
93
|
if not active.action:
|
|
92
94
|
active.status = ERROR
|
|
@@ -167,15 +169,17 @@ def interpreter(state, env):
|
|
|
167
169
|
step = state[0].observation.step
|
|
168
170
|
|
|
169
171
|
end_early = (active1 and active1.status) in (TIMEOUT, ERROR) or (active2 and active2.status in (TIMEOUT, ERROR))
|
|
170
|
-
|
|
172
|
+
one_guessed = False
|
|
173
|
+
two_guessed = False
|
|
171
174
|
|
|
172
175
|
if active1 is not None:
|
|
173
176
|
guessed = False
|
|
174
177
|
if active1.observation.role == GUESSER:
|
|
175
178
|
guessed = guesser_action(active1, inactive1, step)
|
|
176
|
-
|
|
179
|
+
one_guessed = guessed
|
|
177
180
|
else:
|
|
178
181
|
answerer_action(active1, inactive1)
|
|
182
|
+
|
|
179
183
|
if active1.status in (TIMEOUT, ERROR):
|
|
180
184
|
end_game(active1, inactive1, 0, active1.status, DONE)
|
|
181
185
|
elif end_early:
|
|
@@ -187,9 +191,10 @@ def interpreter(state, env):
|
|
|
187
191
|
guessed = False
|
|
188
192
|
if active2.observation.role == GUESSER:
|
|
189
193
|
guessed = guesser_action(active2, inactive2, step)
|
|
190
|
-
|
|
194
|
+
two_guessed = guessed
|
|
191
195
|
else:
|
|
192
196
|
answerer_action(active2, inactive2)
|
|
197
|
+
|
|
193
198
|
if active2.status in (TIMEOUT, ERROR):
|
|
194
199
|
end_game(active2, inactive2, 0, active2.status, DONE)
|
|
195
200
|
elif end_early:
|
|
@@ -197,6 +202,12 @@ def interpreter(state, env):
|
|
|
197
202
|
else:
|
|
198
203
|
increment_turn(active2, inactive2, step, guessed)
|
|
199
204
|
|
|
205
|
+
# make sure to end the game if only one team guessed correctly this round
|
|
206
|
+
if one_guessed and not two_guessed:
|
|
207
|
+
end_game(active2, inactive2, 0, DONE, DONE)
|
|
208
|
+
elif two_guessed and not one_guessed:
|
|
209
|
+
end_game(active1, inactive1, 0, DONE, DONE)
|
|
210
|
+
|
|
200
211
|
return state
|
|
201
212
|
|
|
202
213
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
kaggle_environments/__init__.py,sha256=
|
|
1
|
+
kaggle_environments/__init__.py,sha256=GLAeDVUie_HHzdc53NGrEhi1Hd8BR0Tm76lZOepQxJY,1702
|
|
2
2
|
kaggle_environments/agent.py,sha256=BpYrAC6EOhJF3Wzynq-CWg8l-z5uXW1Lq4qUsyOM0ik,6203
|
|
3
3
|
kaggle_environments/api.py,sha256=eLBKqr11Ku4tdsMUdUqy74FIVEA_hdV3_QUpX84x3Z8,798
|
|
4
4
|
kaggle_environments/core.py,sha256=IrEkN9cIA2djBAxI8Sz1GRpGNKjhqbnBdV6irAeTm8Q,27851
|
|
@@ -70,9 +70,9 @@ kaggle_environments/envs/kore_fleets/starter_bots/ts/test/configuration.json,sha
|
|
|
70
70
|
kaggle_environments/envs/kore_fleets/starter_bots/ts/test/fullob.json,sha256=lEWzlv1rqiDMRmLqiGIO3j6m2Uf7OMjXx0zXBplAz1M,6791
|
|
71
71
|
kaggle_environments/envs/kore_fleets/starter_bots/ts/test/observation.json,sha256=SIgLl8uTPmv2T_-g3gsFaibh_DWfvZNlZS7yPXL1Cnc,5998
|
|
72
72
|
kaggle_environments/envs/llm_20_questions/keywords.py,sha256=BnyVrV0_xbiDt_Td4YXSKae9hHndAo5YYfYVtyL4eS4,45282
|
|
73
|
-
kaggle_environments/envs/llm_20_questions/llm_20_questions.js,sha256=
|
|
73
|
+
kaggle_environments/envs/llm_20_questions/llm_20_questions.js,sha256=o30Nx1Tt0eAxBsQukmyxYlr7GuvptTUADWUnEnYDHe8,6009
|
|
74
74
|
kaggle_environments/envs/llm_20_questions/llm_20_questions.json,sha256=VYxgQEDCaJv910sQdE_FOtV2w1V83Y3C6nTjx4FFZyo,2101
|
|
75
|
-
kaggle_environments/envs/llm_20_questions/llm_20_questions.py,sha256=
|
|
75
|
+
kaggle_environments/envs/llm_20_questions/llm_20_questions.py,sha256=M6FBRJkt26GdYyxoORsP3WZcutgEsGOrlmeosO8ceG4,9429
|
|
76
76
|
kaggle_environments/envs/lux_ai_2021/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
77
77
|
kaggle_environments/envs/lux_ai_2021/agents.py,sha256=bDqsY17Jxrk69a8HXb96ex2U1ipKkQPVJuXxmiA5hMA,421
|
|
78
78
|
kaggle_environments/envs/lux_ai_2021/index.html,sha256=4Ec1FuHuuH1EvkvlLOpNUUFYLovnS_IA-rOOHEUjcGY,1550
|
|
@@ -176,9 +176,9 @@ kaggle_environments/envs/tictactoe/tictactoe.js,sha256=NZDT-oSG0a6a-rso9Ldh9qkJw
|
|
|
176
176
|
kaggle_environments/envs/tictactoe/tictactoe.json,sha256=zMXZ8-fpT7FBhzz2FFBvRLn4XwtngjEqOieMvI6cCj8,1121
|
|
177
177
|
kaggle_environments/envs/tictactoe/tictactoe.py,sha256=iLNU5V-lz7Xab-d1vpPMfU5jDM3QtgBUH63Y_SU7I9Y,3639
|
|
178
178
|
kaggle_environments/static/player.html,sha256=HH8qvFfTIDw8eZvw5W88jcCu58Lo4_eUQ1ak46KWVGQ,22945
|
|
179
|
-
kaggle_environments-1.14.
|
|
180
|
-
kaggle_environments-1.14.
|
|
181
|
-
kaggle_environments-1.14.
|
|
182
|
-
kaggle_environments-1.14.
|
|
183
|
-
kaggle_environments-1.14.
|
|
184
|
-
kaggle_environments-1.14.
|
|
179
|
+
kaggle_environments-1.14.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
180
|
+
kaggle_environments-1.14.7.dist-info/METADATA,sha256=Na5tC27wfRLtDqMjvgQpnD_28H_b6NnSNmC2CDJmoE8,10700
|
|
181
|
+
kaggle_environments-1.14.7.dist-info/WHEEL,sha256=m9WAupmBd2JGDsXWQGJgMGXIWbQY3F5c2xBJbBhq0nY,110
|
|
182
|
+
kaggle_environments-1.14.7.dist-info/entry_points.txt,sha256=HbVC-LKGQFV6lEEYBYyDTtrkHgdHJUWQ8_qt9KHGqz4,70
|
|
183
|
+
kaggle_environments-1.14.7.dist-info/top_level.txt,sha256=v3MMWIPMQFcI-WuF_dJngHWe9Bb2yH_6p4wat1x4gAc,20
|
|
184
|
+
kaggle_environments-1.14.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{kaggle_environments-1.14.5.dist-info → kaggle_environments-1.14.7.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|