kaggle-environments 1.14.5__py2.py3-none-any.whl → 1.14.6__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.

@@ -21,7 +21,7 @@ from .main import http_request
21
21
  from . import errors
22
22
  from . import utils
23
23
 
24
- __version__ = "1.14.5"
24
+ __version__ = "1.14.6"
25
25
 
26
26
  __all__ = ["Agent", "environments", "errors", "evaluate", "http_request",
27
27
  "make", "register", "utils", "__version__",
@@ -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?.[1] || "Team 2";
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 kewyord Paris?]. Respond only with the word [paris]."""
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)):
@@ -167,15 +167,17 @@ def interpreter(state, env):
167
167
  step = state[0].observation.step
168
168
 
169
169
  end_early = (active1 and active1.status) in (TIMEOUT, ERROR) or (active2 and active2.status in (TIMEOUT, ERROR))
170
- either_guessed = False
170
+ one_guessed = False
171
+ two_guessed = False
171
172
 
172
173
  if active1 is not None:
173
174
  guessed = False
174
175
  if active1.observation.role == GUESSER:
175
176
  guessed = guesser_action(active1, inactive1, step)
176
- either_guessed = guessed
177
+ one_guessed = guessed
177
178
  else:
178
179
  answerer_action(active1, inactive1)
180
+
179
181
  if active1.status in (TIMEOUT, ERROR):
180
182
  end_game(active1, inactive1, 0, active1.status, DONE)
181
183
  elif end_early:
@@ -187,9 +189,10 @@ def interpreter(state, env):
187
189
  guessed = False
188
190
  if active2.observation.role == GUESSER:
189
191
  guessed = guesser_action(active2, inactive2, step)
190
- either_guessed = either_guessed or guessed
192
+ two_guessed = guessed
191
193
  else:
192
194
  answerer_action(active2, inactive2)
195
+
193
196
  if active2.status in (TIMEOUT, ERROR):
194
197
  end_game(active2, inactive2, 0, active2.status, DONE)
195
198
  elif end_early:
@@ -197,6 +200,12 @@ def interpreter(state, env):
197
200
  else:
198
201
  increment_turn(active2, inactive2, step, guessed)
199
202
 
203
+ # make sure to end the game if only one team guessed correctly this round
204
+ if one_guessed and not two_guessed:
205
+ end_game(active2, inactive2, 0, DONE, DONE)
206
+ elif two_guessed and not one_guessed:
207
+ end_game(active1, inactive1, 0, DONE, DONE)
208
+
200
209
  return state
201
210
 
202
211
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kaggle-environments
3
- Version: 1.14.5
3
+ Version: 1.14.6
4
4
  Summary: Kaggle Environments
5
5
  Home-page: https://github.com/Kaggle/kaggle-environments
6
6
  Author: Kaggle
@@ -1,4 +1,4 @@
1
- kaggle_environments/__init__.py,sha256=sQ-D4OKiM-2xFoo9MlUPMX_TYBykHXx-VQE9QWp-ro0,1702
1
+ kaggle_environments/__init__.py,sha256=hPRYE2tJ2sk-B3QLoCYsaoGabpxvNYM46oH9MeJG6m0,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=qy6V_j7GOqjCbCowBdJ6dtr23HCvK2MdSbQWi-0blPY,5923
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=x5vPzxe0t-OZSUf_KBaiIlvW_PCbpKPqOE7ORPTCjXA,9073
75
+ kaggle_environments/envs/llm_20_questions/llm_20_questions.py,sha256=cvcujfKJRXo17S4-gHkPpJtFWavmD7jBoFggjw2yLo0,9341
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.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
180
- kaggle_environments-1.14.5.dist-info/METADATA,sha256=Zn6TzB6J1NEXFrMd2W2M_DFkdXgqXQ_wZhx5uus8H18,10700
181
- kaggle_environments-1.14.5.dist-info/WHEEL,sha256=m9WAupmBd2JGDsXWQGJgMGXIWbQY3F5c2xBJbBhq0nY,110
182
- kaggle_environments-1.14.5.dist-info/entry_points.txt,sha256=HbVC-LKGQFV6lEEYBYyDTtrkHgdHJUWQ8_qt9KHGqz4,70
183
- kaggle_environments-1.14.5.dist-info/top_level.txt,sha256=v3MMWIPMQFcI-WuF_dJngHWe9Bb2yH_6p4wat1x4gAc,20
184
- kaggle_environments-1.14.5.dist-info/RECORD,,
179
+ kaggle_environments-1.14.6.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
180
+ kaggle_environments-1.14.6.dist-info/METADATA,sha256=V1iJ5xdkq_om0PoWL06DaLDvj0pmXAht0tOyz96XPWA,10700
181
+ kaggle_environments-1.14.6.dist-info/WHEEL,sha256=m9WAupmBd2JGDsXWQGJgMGXIWbQY3F5c2xBJbBhq0nY,110
182
+ kaggle_environments-1.14.6.dist-info/entry_points.txt,sha256=HbVC-LKGQFV6lEEYBYyDTtrkHgdHJUWQ8_qt9KHGqz4,70
183
+ kaggle_environments-1.14.6.dist-info/top_level.txt,sha256=v3MMWIPMQFcI-WuF_dJngHWe9Bb2yH_6p4wat1x4gAc,20
184
+ kaggle_environments-1.14.6.dist-info/RECORD,,