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

Files changed (69) hide show
  1. kaggle_environments/__init__.py +1 -1
  2. kaggle_environments/envs/chess/chess.js +63 -22
  3. kaggle_environments/envs/chess/chess.json +4 -4
  4. kaggle_environments/envs/chess/chess.py +209 -51
  5. kaggle_environments/envs/chess/test_chess.py +43 -1
  6. kaggle_environments/envs/connectx/connectx.ipynb +3183 -0
  7. kaggle_environments/envs/football/football.ipynb +75 -0
  8. kaggle_environments/envs/halite/halite.ipynb +44736 -0
  9. kaggle_environments/envs/kore_fleets/kore_fleets.ipynb +112 -0
  10. kaggle_environments/envs/kore_fleets/starter_bots/java/Bot.java +54 -0
  11. kaggle_environments/envs/kore_fleets/starter_bots/java/README.md +26 -0
  12. kaggle_environments/envs/kore_fleets/starter_bots/java/jars/hamcrest-core-1.3.jar +0 -0
  13. kaggle_environments/envs/kore_fleets/starter_bots/java/jars/junit-4.13.2.jar +0 -0
  14. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/Board.java +518 -0
  15. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/Cell.java +61 -0
  16. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/Configuration.java +24 -0
  17. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/Direction.java +166 -0
  18. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/Fleet.java +72 -0
  19. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/KoreJson.java +97 -0
  20. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/Observation.java +72 -0
  21. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/Pair.java +13 -0
  22. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/Player.java +68 -0
  23. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/Point.java +65 -0
  24. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/Shipyard.java +70 -0
  25. kaggle_environments/envs/kore_fleets/starter_bots/java/kore/ShipyardAction.java +59 -0
  26. kaggle_environments/envs/kore_fleets/starter_bots/java/test/BoardTest.java +567 -0
  27. kaggle_environments/envs/kore_fleets/starter_bots/java/test/ConfigurationTest.java +25 -0
  28. kaggle_environments/envs/kore_fleets/starter_bots/java/test/KoreJsonTest.java +62 -0
  29. kaggle_environments/envs/kore_fleets/starter_bots/java/test/ObservationTest.java +46 -0
  30. kaggle_environments/envs/kore_fleets/starter_bots/java/test/PointTest.java +21 -0
  31. kaggle_environments/envs/kore_fleets/starter_bots/java/test/ShipyardTest.java +22 -0
  32. kaggle_environments/envs/kore_fleets/starter_bots/ts/README.md +55 -0
  33. kaggle_environments/envs/lux_ai_2021/README.md +3 -0
  34. kaggle_environments/envs/lux_ai_2021/dimensions/754.js.LICENSE.txt +296 -0
  35. kaggle_environments/envs/lux_ai_2021/test_agents/js_simple/simple.tar.gz +0 -0
  36. kaggle_environments/envs/lux_ai_2021/testing.md +23 -0
  37. kaggle_environments/envs/lux_ai_2021/todo.md.og +18 -0
  38. kaggle_environments/envs/lux_ai_s2/.gitignore +1 -0
  39. kaggle_environments/envs/lux_ai_s2/README.md +21 -0
  40. kaggle_environments/envs/lux_ai_s2/luxai_s2/.DS_Store +0 -0
  41. kaggle_environments/envs/lux_ai_s2/luxai_s2/map_generator/.DS_Store +0 -0
  42. kaggle_environments/envs/lux_ai_s3/README.md +21 -0
  43. kaggle_environments/envs/lux_ai_s3/agents.py +4 -0
  44. kaggle_environments/envs/lux_ai_s3/index.html +42 -0
  45. kaggle_environments/envs/lux_ai_s3/lux_ai_s3.json +47 -0
  46. kaggle_environments/envs/lux_ai_s3/lux_ai_s3.py +138 -0
  47. kaggle_environments/envs/lux_ai_s3/luxai_s3/__init__.py +1 -0
  48. kaggle_environments/envs/lux_ai_s3/luxai_s3/env.py +924 -0
  49. kaggle_environments/envs/lux_ai_s3/luxai_s3/globals.py +13 -0
  50. kaggle_environments/envs/lux_ai_s3/luxai_s3/params.py +101 -0
  51. kaggle_environments/envs/lux_ai_s3/luxai_s3/profiler.py +140 -0
  52. kaggle_environments/envs/lux_ai_s3/luxai_s3/pygame_render.py +270 -0
  53. kaggle_environments/envs/lux_ai_s3/luxai_s3/spaces.py +30 -0
  54. kaggle_environments/envs/lux_ai_s3/luxai_s3/state.py +399 -0
  55. kaggle_environments/envs/lux_ai_s3/luxai_s3/utils.py +12 -0
  56. kaggle_environments/envs/lux_ai_s3/luxai_s3/wrappers.py +187 -0
  57. kaggle_environments/envs/lux_ai_s3/test_agents/python/agent.py +71 -0
  58. kaggle_environments/envs/lux_ai_s3/test_agents/python/lux/__init__.py +0 -0
  59. kaggle_environments/envs/lux_ai_s3/test_agents/python/lux/kit.py +27 -0
  60. kaggle_environments/envs/lux_ai_s3/test_agents/python/lux/utils.py +17 -0
  61. kaggle_environments/envs/lux_ai_s3/test_agents/python/main.py +53 -0
  62. kaggle_environments/envs/lux_ai_s3/test_lux.py +9 -0
  63. kaggle_environments/envs/tictactoe/tictactoe.ipynb +1393 -0
  64. {kaggle_environments-1.15.2.dist-info → kaggle_environments-1.16.0.dist-info}/METADATA +2 -2
  65. {kaggle_environments-1.15.2.dist-info → kaggle_environments-1.16.0.dist-info}/RECORD +69 -11
  66. {kaggle_environments-1.15.2.dist-info → kaggle_environments-1.16.0.dist-info}/WHEEL +1 -1
  67. {kaggle_environments-1.15.2.dist-info → kaggle_environments-1.16.0.dist-info}/LICENSE +0 -0
  68. {kaggle_environments-1.15.2.dist-info → kaggle_environments-1.16.0.dist-info}/entry_points.txt +0 -0
  69. {kaggle_environments-1.15.2.dist-info → kaggle_environments-1.16.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,21 @@
1
+ package test;
2
+
3
+ import org.junit.Assert;
4
+ import org.junit.Test;
5
+
6
+ import kore.Point;
7
+
8
+ public class PointTest {
9
+
10
+ @Test
11
+ public void fromIndexToIndex_isIdentity() {
12
+ int idx = 254;
13
+ int size = 31;
14
+
15
+ Point point = Point.fromIndex(idx, size);
16
+ int mirroredIdx = point.toIndex(size);
17
+
18
+ Assert.assertEquals(idx, mirroredIdx);
19
+ }
20
+
21
+ }
@@ -0,0 +1,22 @@
1
+ package test;
2
+
3
+ import org.junit.Assert;
4
+ import org.junit.Test;
5
+
6
+ import kore.Point;
7
+ import kore.Shipyard;
8
+
9
+ public class ShipyardTest {
10
+
11
+ @Test
12
+ public void maxSpawn_worksCorrectly() {
13
+ int[] turns = {0, 1, 2, 293, 294, 295};
14
+ int[] expected = {1, 1, 2, 9, 10, 10};
15
+ for (int i = 0; i < turns.length; i ++) {
16
+ Shipyard shipyard = new Shipyard("A", 0, new Point(0, 0), 1, turns[i], null, null);
17
+
18
+ Assert.assertEquals(shipyard.maxSpawn(), expected[i]);
19
+ }
20
+ }
21
+
22
+ }
@@ -0,0 +1,55 @@
1
+ # Kore Fleets typescript bot
2
+
3
+ ## Requirements
4
+
5
+ 1. node and npm/npx/yarn
6
+ 2. typescript installed
7
+ 3. python3 installed
8
+ 4. kaggle_environments pip package installed
9
+
10
+ ## Getting started
11
+
12
+ 1. `npm install`
13
+
14
+ ## Running Locally
15
+
16
+ 1. transpile your bot with `npm run compile` or `tsc`
17
+ 2. run a match with `npm watch4`
18
+
19
+ * if you don't have google-chrome installed, open the replay.html in the browser of your choice
20
+ * see package.json for more options
21
+
22
+ ## Creating a submission
23
+
24
+ 1. `npm run package`
25
+ 2. upload submission.tar.gz to kaggle
26
+ 3. profit!
27
+
28
+ ## Running tests
29
+
30
+ 1. `npm test`
31
+
32
+ ## Interpreter and training
33
+
34
+ A basic TS interpreter has been created in `interpreter.ts`. You can use or modify this file to train machine learning models in JS/TS.
35
+
36
+ Currently it supports 2 agents and customizable number of episodes.
37
+
38
+ It has two modes: `run` and `step`.
39
+
40
+ `run` mode: After each episode, you can access the complete history of the game. For each turn, you can access the full observation (state) as a Board object, actions performed and the reward obtained after performing the action. This mode is useful for evaluating an agent.
41
+
42
+ `step` mode: The interpreter initializes new games and allows stepping through the game interactively. You have complete control over the board and the agent during each step. This mode is useful for training machine learning models.
43
+
44
+ Sample command to run the interpreter can be found in npm scripts as `npm run interpreter:run` and `npm run interpreter:step`.
45
+
46
+ ## Miner bot and Do nothing bot
47
+
48
+ A sample miner bot `MinerBot.ts` is provided, with Python entrypoint as `miner.py`. It has the same logic as the Python `miner` bot in `kore_fleets.py`.
49
+
50
+ To run it aginst Python miner bot with TS interpreter for 20 episodes:
51
+
52
+ 1. `npm run compile`
53
+ 2. `node --require ts-node/register interpreter.ts 20 ./miner.py miner`
54
+
55
+ A sample do nothing bot `DoNothingBot.ts` is also provided.
@@ -0,0 +1,3 @@
1
+ # Lux AI Challenge Season 1
2
+
3
+ Welcome to the Kaggle Environments wrapped around the Lux AI Challenge Season 1! For more information or if you have an issues or want to make contributes, check out the main repository at https://github.com/Lux-AI-Challenge/Lux-Design-2021
@@ -0,0 +1,296 @@
1
+ /*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */
6
+
7
+ /*!
8
+ * accepts
9
+ * Copyright(c) 2014 Jonathan Ong
10
+ * Copyright(c) 2015 Douglas Christopher Wilson
11
+ * MIT Licensed
12
+ */
13
+
14
+ /*!
15
+ * body-parser
16
+ * Copyright(c) 2014 Jonathan Ong
17
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
18
+ * MIT Licensed
19
+ */
20
+
21
+ /*!
22
+ * body-parser
23
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
24
+ * MIT Licensed
25
+ */
26
+
27
+ /*!
28
+ * bytes
29
+ * Copyright(c) 2012-2014 TJ Holowaychuk
30
+ * Copyright(c) 2015 Jed Watson
31
+ * MIT Licensed
32
+ */
33
+
34
+ /*!
35
+ * content-disposition
36
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
37
+ * MIT Licensed
38
+ */
39
+
40
+ /*!
41
+ * content-type
42
+ * Copyright(c) 2015 Douglas Christopher Wilson
43
+ * MIT Licensed
44
+ */
45
+
46
+ /*!
47
+ * cookie
48
+ * Copyright(c) 2012-2014 Roman Shtylman
49
+ * Copyright(c) 2015 Douglas Christopher Wilson
50
+ * MIT Licensed
51
+ */
52
+
53
+ /*!
54
+ * depd
55
+ * Copyright(c) 2014 Douglas Christopher Wilson
56
+ * MIT Licensed
57
+ */
58
+
59
+ /*!
60
+ * depd
61
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
62
+ * MIT Licensed
63
+ */
64
+
65
+ /*!
66
+ * depd
67
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
68
+ * MIT Licensed
69
+ */
70
+
71
+ /*!
72
+ * depd
73
+ * Copyright(c) 2015 Douglas Christopher Wilson
74
+ * MIT Licensed
75
+ */
76
+
77
+ /*!
78
+ * destroy
79
+ * Copyright(c) 2014 Jonathan Ong
80
+ * MIT Licensed
81
+ */
82
+
83
+ /*!
84
+ * ee-first
85
+ * Copyright(c) 2014 Jonathan Ong
86
+ * MIT Licensed
87
+ */
88
+
89
+ /*!
90
+ * encodeurl
91
+ * Copyright(c) 2016 Douglas Christopher Wilson
92
+ * MIT Licensed
93
+ */
94
+
95
+ /*!
96
+ * escape-html
97
+ * Copyright(c) 2012-2013 TJ Holowaychuk
98
+ * Copyright(c) 2015 Andreas Lubbe
99
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
100
+ * MIT Licensed
101
+ */
102
+
103
+ /*!
104
+ * etag
105
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
106
+ * MIT Licensed
107
+ */
108
+
109
+ /*!
110
+ * express
111
+ * Copyright(c) 2009-2013 TJ Holowaychuk
112
+ * Copyright(c) 2013 Roman Shtylman
113
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
114
+ * MIT Licensed
115
+ */
116
+
117
+ /*!
118
+ * express
119
+ * Copyright(c) 2009-2013 TJ Holowaychuk
120
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
121
+ * MIT Licensed
122
+ */
123
+
124
+ /*!
125
+ * finalhandler
126
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
127
+ * MIT Licensed
128
+ */
129
+
130
+ /*!
131
+ * forwarded
132
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
133
+ * MIT Licensed
134
+ */
135
+
136
+ /*!
137
+ * fresh
138
+ * Copyright(c) 2012 TJ Holowaychuk
139
+ * Copyright(c) 2016-2017 Douglas Christopher Wilson
140
+ * MIT Licensed
141
+ */
142
+
143
+ /*!
144
+ * http-errors
145
+ * Copyright(c) 2014 Jonathan Ong
146
+ * Copyright(c) 2016 Douglas Christopher Wilson
147
+ * MIT Licensed
148
+ */
149
+
150
+ /*!
151
+ * media-typer
152
+ * Copyright(c) 2014 Douglas Christopher Wilson
153
+ * MIT Licensed
154
+ */
155
+
156
+ /*!
157
+ * merge-descriptors
158
+ * Copyright(c) 2014 Jonathan Ong
159
+ * Copyright(c) 2015 Douglas Christopher Wilson
160
+ * MIT Licensed
161
+ */
162
+
163
+ /*!
164
+ * methods
165
+ * Copyright(c) 2013-2014 TJ Holowaychuk
166
+ * Copyright(c) 2015-2016 Douglas Christopher Wilson
167
+ * MIT Licensed
168
+ */
169
+
170
+ /*!
171
+ * mime-db
172
+ * Copyright(c) 2014 Jonathan Ong
173
+ * MIT Licensed
174
+ */
175
+
176
+ /*!
177
+ * mime-types
178
+ * Copyright(c) 2014 Jonathan Ong
179
+ * Copyright(c) 2015 Douglas Christopher Wilson
180
+ * MIT Licensed
181
+ */
182
+
183
+ /*!
184
+ * negotiator
185
+ * Copyright(c) 2012 Federico Romero
186
+ * Copyright(c) 2012-2014 Isaac Z. Schlueter
187
+ * Copyright(c) 2015 Douglas Christopher Wilson
188
+ * MIT Licensed
189
+ */
190
+
191
+ /*!
192
+ * on-finished
193
+ * Copyright(c) 2013 Jonathan Ong
194
+ * Copyright(c) 2014 Douglas Christopher Wilson
195
+ * MIT Licensed
196
+ */
197
+
198
+ /*!
199
+ * parseurl
200
+ * Copyright(c) 2014 Jonathan Ong
201
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
202
+ * MIT Licensed
203
+ */
204
+
205
+ /*!
206
+ * proxy-addr
207
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
208
+ * MIT Licensed
209
+ */
210
+
211
+ /*!
212
+ * range-parser
213
+ * Copyright(c) 2012-2014 TJ Holowaychuk
214
+ * Copyright(c) 2015-2016 Douglas Christopher Wilson
215
+ * MIT Licensed
216
+ */
217
+
218
+ /*!
219
+ * raw-body
220
+ * Copyright(c) 2013-2014 Jonathan Ong
221
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
222
+ * MIT Licensed
223
+ */
224
+
225
+ /*!
226
+ * send
227
+ * Copyright(c) 2012 TJ Holowaychuk
228
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
229
+ * MIT Licensed
230
+ */
231
+
232
+ /*!
233
+ * serve-static
234
+ * Copyright(c) 2010 Sencha Inc.
235
+ * Copyright(c) 2011 TJ Holowaychuk
236
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
237
+ * MIT Licensed
238
+ */
239
+
240
+ /*!
241
+ * statuses
242
+ * Copyright(c) 2014 Jonathan Ong
243
+ * Copyright(c) 2016 Douglas Christopher Wilson
244
+ * MIT Licensed
245
+ */
246
+
247
+ /*!
248
+ * toidentifier
249
+ * Copyright(c) 2016 Douglas Christopher Wilson
250
+ * MIT Licensed
251
+ */
252
+
253
+ /*!
254
+ * type-is
255
+ * Copyright(c) 2014 Jonathan Ong
256
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
257
+ * MIT Licensed
258
+ */
259
+
260
+ /*!
261
+ * unpipe
262
+ * Copyright(c) 2015 Douglas Christopher Wilson
263
+ * MIT Licensed
264
+ */
265
+
266
+ /*!
267
+ * vary
268
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
269
+ * MIT Licensed
270
+ */
271
+
272
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
273
+
274
+ /**
275
+ * @license
276
+ * Lodash <https://lodash.com/>
277
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
278
+ * Released under MIT license <https://lodash.com/license>
279
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
280
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
281
+ */
282
+
283
+ /**
284
+ * @license Complex.js v2.0.13 12/05/2020
285
+ *
286
+ * Copyright (c) 2020, Robert Eisele (robert@xarg.org)
287
+ * Dual licensed under the MIT or GPL Version 2 licenses.
288
+ **/
289
+
290
+ /**
291
+ * @license Fraction.js v4.1.1 23/05/2021
292
+ * https://www.xarg.org/2014/03/rational-numbers-in-javascript/
293
+ *
294
+ * Copyright (c) 2021, Robert Eisele (robert@xarg.org)
295
+ * Dual licensed under the MIT or GPL Version 2 licenses.
296
+ **/
@@ -0,0 +1,23 @@
1
+ Unfortunately at this moment, there isn't a progammatic way to test if the Kaggle Engine is the exact same as the engine competitors use when local testing. This is part of a TODO to make kaggle replays match the local replays players generate when they develop locally using https://github.com/Lux-AI-Challenge/Lux-Design-2021
2
+
3
+ The following steps work for now:
4
+
5
+ First download the simple kit from https://github.com/Lux-AI-Challenge/Lux-Design-2021/tree/master/kits/python (or another language) or use your own bot
6
+
7
+ First run a game in Kaggle like so:
8
+
9
+ ```
10
+ kaggle-environments run --environment lux_ai_2021 --agents path/to/bot/main.py path/to/bot/main.py --render '{"mode": "json"}' --out out.json --debug=True
11
+ ```
12
+
13
+ Then upload the out.json to https://2021vis.lux-ai.org/ and go to the final turn.
14
+
15
+ Then install the local engine `npm i -g install @lux-ai/2021-challenge` if you haven't done so already (you can remove `-g` and do `npx lux-ai-2021` as opposed to `lux-ai-2021`)
16
+
17
+ Then run
18
+
19
+ ```
20
+ lux-ai-2021 path/to/bot/main.py path/to/bot/main.py --out=replay.json
21
+ ```
22
+
23
+ upload `replay.json` to the replay viewer again in a new tab and compare the final state with the other kaggle produced match. If the statistics and layout of units on the map match, then the engine is working correctly. (Given the complexity of the game and that `lux-ai-2021` generates action based replays, should a single thing be wrong, the differences in the final turn would be fairly massive so this is generally a sufficient test)
@@ -0,0 +1,18 @@
1
+ # TODOs
2
+
3
+
4
+ [x] Setup Visualizer
5
+
6
+ [x] Keep dimensions engine results consistent with kaggle-env integated version
7
+
8
+ [ ] Verify rewards work correctly
9
+
10
+ [ ] display correct agent names
11
+
12
+ [ ] default turn debug mode off
13
+
14
+ [ ] add tests for more bots
15
+
16
+ [ ] allow user to pass in custom configurations
17
+
18
+ [ ] allow user to specify debug mode level for the dimensions engine
@@ -0,0 +1 @@
1
+ build/
@@ -0,0 +1,21 @@
1
+ # Lux AI Challenge Season 2
2
+
3
+ Welcome to the Kaggle Environments wrapped around the Lux AI Challenge Season 2! For more information or if you have an issues or want to make contributes, check out the main repository at https://github.com/Lux-AI-Challenge/Lux-Design-2022
4
+
5
+ ## Test scripts
6
+
7
+ ```
8
+ kaggle-environments run --environment lux_ai_2022 --agents path/to/bot/main.py path/to/bot/main.py --render '{"mode": "json"}' --out out.json --debug=True
9
+ ```
10
+
11
+ ```
12
+ kaggle-environments run --environment lux_ai_2022 --agents ../Lux-Design-2022/kits/js/main.py ../Lux-Design-2022/kits/js/main.py --render '{"mode": "json"}' --out out.json --debug=True
13
+ ```
14
+
15
+ ## Packaging external packages locally
16
+
17
+ git clone open_simplex and petting zoo directly and move them into here
18
+
19
+ ## Visualizer
20
+
21
+ Ensure that the script module is at the bottom of <body> tag.
@@ -0,0 +1,21 @@
1
+ # Lux AI Challenge Season 3
2
+
3
+ Welcome to the Kaggle Environments wrapped around the Lux AI Challenge Season 3! For more information or if you have an issues or want to make contributes, check out the main repository at https://github.com/Lux-AI-Challenge/Lux-Design-S3
4
+
5
+ ## Test scripts
6
+
7
+ ```
8
+ kaggle-environments run --environment lux_ai_s3 --agents path/to/bot/main.py path/to/bot/main.py --render '{"mode": "json"}' --out out.json --debug=True
9
+ ```
10
+
11
+ ```
12
+ kaggle-environments run --environment lux_ai_s3 --agents ../LuxAI/Lux-Design-S3/kits/python/main.py ../LuxAI/Lux-Design-S3/kits/python/main.py --render '{"mode": "json"}' --out out.json --debug=True
13
+ ```
14
+ <!--
15
+ ## Packaging external packages locally
16
+
17
+ git clone open_simplex and petting zoo directly and move them into here -->
18
+
19
+ ## Visualizer
20
+
21
+ Ensure that the script module is at the bottom of <body> tag.
@@ -0,0 +1,4 @@
1
+ from .test_agents.python.main import agent_fn as random_agent
2
+ all_agents = {
3
+ "random_agent": random_agent,
4
+ }
@@ -0,0 +1,42 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="https://s3vis.lux-ai.org/eye.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+
8
+ <title>Lux Eye S3</title>
9
+
10
+ <!-- Start Single Page Apps for GitHub Pages -->
11
+ <script type="text/javascript">
12
+ // Single Page Apps for GitHub Pages
13
+ // MIT License
14
+ // https://github.com/rafgraph/spa-github-pages
15
+ // This script checks to see if a redirect is present in the query string,
16
+ // converts it back into the correct url and adds it to the
17
+ // browser's history using window.history.replaceState(...),
18
+ // which won't cause the browser to attempt to load the new url.
19
+ // When the single page app is loaded further down in this file,
20
+ // the correct url will be waiting in the browser's history for
21
+ // the single page app to route accordingly.
22
+ (function (l) {
23
+ if (l.search[1] === '/') {
24
+ const decoded = l.search
25
+ .slice(1)
26
+ .split('&')
27
+ .map(function (s) {
28
+ return s.replace(/~and~/g, '&');
29
+ })
30
+ .join('?');
31
+ window.history.replaceState(null, null, l.pathname.slice(0, -1) + decoded + l.hash);
32
+ }
33
+ })(window.location);
34
+ </script>
35
+ <!-- End Single Page Apps for GitHub Pages -->
36
+ <script type="module" crossorigin src="https://s3vis.lux-ai.org/index.js"></script>
37
+ </head>
38
+ <body>
39
+ <div id="root"></div>
40
+
41
+ </body>
42
+ </html>
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "lux_ai_s3",
3
+ "title": "Lux AI Challenge Season 3",
4
+ "description": "A Novel AI Programming Challenge about Lux",
5
+ "version": "0.0.1",
6
+ "agents": [2],
7
+ "configuration": {
8
+ "episodeSteps": 506,
9
+ "seed": {
10
+ "description": "Seed to use for episodes",
11
+ "type": "integer"
12
+ },
13
+ "actTimeout": 3,
14
+ "runTimeout": 60,
15
+ "env_cfg": {
16
+ "description": "Environment configuration. Not to be filled out by user as it is randomly generated.",
17
+ "type": "object"
18
+ }
19
+ },
20
+ "reward": {
21
+ "description": "Reward of the agent. Equal to number of games won.",
22
+ "type": "integer",
23
+ "default": 0
24
+ },
25
+ "observation": {
26
+ "remainingOverageTime": 60,
27
+ "reward": {
28
+ "description": "Current reward of the agent. Equal to amount of lichen grown.",
29
+ "type": "integer",
30
+ "default": 0
31
+ },
32
+ "obs": {
33
+ "description": "String containing the observations",
34
+ "type": "string",
35
+ "shared": false
36
+ },
37
+ "player": {
38
+ "description": "Current player's index / team id",
39
+ "type": "string",
40
+ "defaults": "player_0"
41
+ }
42
+ },
43
+ "action": {
44
+ "description": "Actions",
45
+ "type": "object"
46
+ }
47
+ }