acmucsd / element.ai Goto Github PK
View Code? Open in Web Editor NEWACM AI Winter 2023 Competition ๐พ โ๏ธ
ACM AI Winter 2023 Competition ๐พ โ๏ธ
Option of having other agents (non- player) move in random directions and to reset them whenever they die.
print(stuff, file=sys.stderr
obs['player_0']
(or whatever player number) to make sure everything makes sense (e.g. obs['player_0']['resetting']
is not True
while the players should be alive). if smth seems off, pls flag itself.place_boost_bomb(rate = 0.1)
to self.place_boost_bomb(rate = 0)
. make sure you don't commit this changeremainingOverageTime
, which starts at 60 seconds. If that's exhausted, the environment will take no action from the bot and make it go forwardremainingOverageTime
remainingOverageTime
remainingOverageTime
remainingOverageTime
asyncio.wait
-- make the bot wait some amount of time, and print remainingOverageTime
each iterationgrid_sim.py
)self-explanatory
print(stuff, file=sys.stderr
obs['player_0']
(or whatever player number) to make sure everything makes sense (e.g. obs['player_0']['resetting']
is not True
while the players should be alive). if smth seems off, pls flag itself.place_boost_bomb(rate = 0.1)
to self.place_boost_bomb(rate = 0)
. make sure you don't commit this changeobs['player_0']['direction']
should be (-1, -1)
obs['player_0']['resetting']
should be True
obs['player_0']['head']
should be (-1, -1)
obs['player_0']['energy']
should be 0
obs['player_0']['speed']
should be 1
In line with our conversion from grid-sim to angle-sim we should make the grid invisible along with more fine grained in order to better simulate angular movement.
Will need to look into the code slow down caused by a larger grid and whether we could optimize the code
Instead of restricting movement to be 90 degrees left or right, modify the input value to increase angle amount based on how long the left or right key is held while still moving
The current end constraint for our game seems to be when the player dies but iirc this was not the constraint in our meeting notes. Let's set the new end condition for the game to be after x amount of time the game automatically ends. Before this amount of time, have the players reset whenever they die to a random location while keeping (and being able to add to) their score in their previous life.
print(stuff, file=sys.stderr
obs['player_0']
(or whatever player number) to make sure everything makes sense (e.g. obs['player_0']['resetting']
is not True
while the players should be alive). if smth seems off, pls flag itself.place_boost_bomb(rate = 0.1)
to self.place_boost_bomb(rate = 0)
. make sure you don't commit this change-o test
, which outputs to test.json. upload test.json to the replay script: https://colab.research.google.com/drive/1ncSEI2xelHIanrWlnqZVIWYn51UTqq7g?authuser=1#scrollTo=zUWD3nDJ4kOi)
board = obs['board']['board_state']
player_owned = obs['board']['players_state']
player_num = obs[self.player]['player_num'])
PASSED = 1
occupied_territory = np.where(np.logical_and(board != PASSED, player_owned == player_num))
num_squares = len(occupied_territory[0])
num_squares
should decrease for player_0 every time player_1 enters player_0's territory-o test
, which outputs to test.json. upload test.json to the replay script: https://colab.research.google.com/drive/1ncSEI2xelHIanrWlnqZVIWYn51UTqq7g?authuser=1#scrollTo=zUWD3nDJ4kOi)
board = obs['board']['board_state']
player_owned = obs['board']['players_state']
player_num = obs[self.player]['player_num'])
PASSED = 1
occupied_territory = np.where(np.logical_and(board != PASSED, player_owned == player_num))
num_squares = len(occupied_territory[0])
num_squares
should be 0 for player_0 and should be all enclosed space for player_1print(stuff, file=sys.stderr
obs['player_0']
(or whatever player number) to make sure everything makes sense (e.g. obs['player_0']['resetting']
is not True
while the players should be alive). if smth seems off, pls flag itself.place_boost_bomb(rate = 0.1)
to self.place_boost_bomb(rate = 0)
. make sure you don't commit this change-o test
, which outputs to test.json. upload test.json to the replay script: https://colab.research.google.com/drive/1ncSEI2xelHIanrWlnqZVIWYn51UTqq7g?authuser=1#scrollTo=zUWD3nDJ4kOi)
obs['board']['players_state']
board = obs['board']['board_state']
player_owned = obs['board']['players_state']
player_num = obs[self.player]['player_num'])
PASSED = 1
occupied_territory = np.where(np.logical_and(board != PASSED, player_owned == player_num))
num_squares = len(occupied_territory[0])
num_squares
should be the correct number of tiles occupied-o test
, which outputs to test.json. upload test.json to the replay script: https://colab.research.google.com/drive/1ncSEI2xelHIanrWlnqZVIWYn51UTqq7g?authuser=1#scrollTo=zUWD3nDJ4kOi)
board = obs['board']['board_state']
player_owned = obs['board']['players_state']
player_num = obs[self.player]['player_num'])
PASSED = 1
occupied_territory = np.where(np.logical_and(board != PASSED, player_owned == player_num))
num_squares = len(occupied_territory[0])
num_squares
should be reduced for player_0 and increased for player_1 by the correct amountsBetter uI
try to make it look like this https://github.com/stevenjoezhang/paper.io
See #20 and the comment #20 (comment)
speed ^ -1 = # of frames you have to wait before you can go
everyone starts by missing x frames before they can go (maybe 10? experiment with it)
when you collect a boost, you decrease # of frames before you go by 1
minimum value for # of frames before you go = 1
const_frames_til_next = 5
, frames_til_next_move = 2
; decrement const_frames_til_next
whenever you hit a boost; decrement frames_til_next_move
til 0, then let them move, then reset it to const_frames_til_next
etc etc
currently if you die, you die, then when everyone dies, the game resets. we want the game to run for x steps. if you die (hit a tail, leave the area boundary, etc), the following should happen
game should run until x steps, after which it ends and some ending message is submitted
every x steps, a new boost should spawn in a random empty spot
blocked by #12
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.