@acmucsd/energium-2020 中文文档教程
Energium AI Competition at UCSD
新千年伊始,能源成为货币,成为地球上大部分资源被开采完后最宝贵的资源。 你是一家拥有收集器技术的能源公司,这些机器人可以在我们太阳系的小行星带上开采一种被称为能源的富含能源的资源。
一对收集器
但是时间很重要,这些机器人需要 AI 来帮助它们有效运行并尽可能多地开采能量可能在时间用完之前。 更糟糕的是,出于某种原因,在同一颗小行星上总有一家竞争对手公司也试图开采资源。 你的目标是建立最好的 AI 代理来控制这些收集器并获得比你的竞争对手更多的能量。 此外,出于某种原因,1000 年来,Javascript、Python 和 Java 仍然是 AI 的流行语言。
请参阅入门,开始编程并上传机器人与他人竞争! 请参阅规范,详细了解比赛的运作方式以及如何开发您的机器人。
现场比赛可在此处找到:https://ai.acmucsd.com/competitions/energium,并将于太平洋夏令时间 10 月 30 日晚上 11:59 正式结束。
此竞赛的启动幻灯片位于:https://docs.google.com/presentation/d/1hBUV9zxmBHi8wuQEHHaNUJK0xEe4ekS8ofq7u9NE6H4/edit#slide=id.ga1eb4373bd
Getting Started
0456从 Javascript, Python,或 Java。 请注意,不支持 Windows,请使用 WSL 访问 linux 发行版。 有关如何使用 WSL 的说明,请参阅this。
确保您已安装至少版本 12 或更高版本的 Node.js。
安装比赛
npm install -g @acmucsd/energium-2020
以运行比赛,运行
acmai-energium path/to/bot/file.js path/to/other/bot/file.js
它将输出比赛结果、任何相关日志、将错误日志存储在 errorlogs
文件夹中,并将重播存储在 replays
文件夹。
如果您有一些看起来不像错误的输出,那么恭喜您! 您刚刚进行了第一场 AI 比赛! 要使用我们的可视化工具并观察展开的内容,请在此处下载我们的可视化工具:https://github.com/acmucsd/energium-ai-2020/raw/main/bundles/visualizer/visualizer.zip
要安装可视化工具,请打开 zip 文件,然后导航到可视化工具文件夹并在可视化工具的文件夹中运行 npm i
。 然后运行 npm run serve
启动可视化工具,它会为您提供访问可视化工具的链接。 上传一个重放文件,可视化工具会告诉你发生了什么!
您可以多次将您的机器人提交到我们的服务器! 要提交您的 bot,请导航至您的 bot 文件夹并运行以压缩您的文件夹的内容
zip -r bot.zip .
一旦您提交,我们的服务器将自动将您的 bot 放入比赛中并在线存储所有结果、重播和日志。 前往 https://ai.acmucsd.com/competitions/energium/ranks 查看当前排行榜以及查找和观看比赛。
有关播种、抑制日志、更改最大计算时间等更多选项,请使用
acmai-energium --help
继续阅读以了解比赛的运作方式和 AI 游戏的规则
Specs
这是一个回合制的 1 对 1 比赛。 每场比赛,两个机器人都会在 200 回合结束时竞争以获得商店中最多的能量。 每一回合,您的机器人都有一秒钟的计算时间来尽一切努力取胜(一秒钟很多!)和大约 1GB 的 RAM(您可能不需要这么多)。 计算时间可能会发生变化,但只会不断增加。
您将获得一个 Player
对象,其中包含有关您的机器人当前存储的能量的详细信息、它有多少个收集器,以及它所有基地的位置>。 有关如何访问此数据和发送命令以运行您的机器人的详细信息,请参阅初学者工具包机器人文件。
您还获得了一个 GameMap
对象,其中包含所有地图图块的数据以及每个图块的能量值。
收藏家 收藏家可以向北、东、南、西 4 个方向移动。 初学者工具包向您展示了如何使用 move
函数移动单位。
每个收集器都有一个故障级别。 每次收集器移动到友好的基地时,此故障级别都会重置为 0。 随着时间的推移,收集器会慢慢分解,每 10 回合等级增加一次。 一旦故障级别为 10,收集器就会发生故障并消失。
如果两个收集器,无论他们在哪个团队,在一回合后都在地图上的同一个板块上,故障级别最低的收集器将存活下来,而同一板块上的所有其他收集器都会发生故障。 如果最低故障水平相同,则所有收集器都会故障。
收集器会自动获得或失去能量,具体取决于存储在收集器所在的图块上的 energium
值。 然后从玩家的能量库中添加或移除该能量。 请注意,有些瓷砖非常耗能,站在上面可能会导致您损失更多能量。 请注意,energium 的特殊之处在于它不会在任何地方耗尽,只要有收集器,它就会始终输出那么多的 energium。
基地
基地能够花费 Energium 在基地顶部生产更多的收集 机器人,以帮助您的公司开采更多的 Energium。 请注意,如果基地顶部已经有一个收集器,则生成的任何新收集器都会破坏现有收集器,或者两个收集器都会损坏!
Packages Available and Versions Used
在比赛服务器上,我们使用的是:
Node 版本 v12.15.0。
Python 3.8.2
Java - openjdk 1.8.0_252
在比赛服务器上,提供以下包供
Python Bots 使用: scipy
, numpy
, pandas
, scikit-learn
FAQ
请加入我们的 competition discord 提问,帮助解决错误,安装,还是大略谈!
https://discord.gg/XsG5etY
Energium AI Competition at UCSD
Upon the dawn of the new millennium, energy has become currency, the most precious resource after majority of Earth's resources have been mined out. You are an energy corporation with the technology of Collectors, robots that can mine a energy rich resource known as energium on the asteroid belts of our solar system.
a pair of collectors
But time is of the essence, and these robots need an AI to help them run effectively and mine as much energium possible before time runs out. What makes matters worse is, there's always a rival corporation on the same asteroid for some reason, trying to mine the resources too. Your goal is to build the best AI agent to control these collectors and get more energy than your competitors. Also, for some reason in 1000 years, Javascript, Python, and Java continue to be prevalent langauges for AI.
See Getting Started to start programming and uploading a bot to compete against others! See Specs for details on how the competition works, and how to develop your bot.
The live competition can be found here: https://ai.acmucsd.com/competitions/energium and will officially conclude October 30th 11:59PM PDT.
Kickoff slides for this competition are here: https://docs.google.com/presentation/d/1hBUV9zxmBHi8wuQEHHaNUJK0xEe4ekS8ofq7u9NE6H4/edit#slide=id.ga1eb4373bd0456
Getting Started
Download a starter kit of your choice from Javascript, Python, or Java. Please note, Windows is not supported, please use WSL to access a linux distribution. See this for instructions on how to use WSL.
Make sure you have Node.js installed, of at least version 12 or above.
Install the competition with
npm install -g @acmucsd/energium-2020
To run a match, run
acmai-energium path/to/bot/file.js path/to/other/bot/file.js
and it will output the game results, any relevant logs, store error logs in a errorlogs
folder, and store a replay in a replays
folder.
If you have some output that doesn't look like an error, then congratulations! You just ran your first AI match! To use our visualizer and watch what unfolded, download our visualizer here: https://github.com/acmucsd/energium-ai-2020/raw/main/bundles/visualizer/visualizer.zip
To install the visualizer, open the zip file, then navigate to the visualizer folder and run npm i
in the visualizer's folder. Then run npm run serve
to start the visualizer up and it will give you the link to where you can access the visualizer. Upload a replay file and the visualizer will show you what went down!
You can submit your bot to our servers as many times as you like! To submit your bot, zip the contents of your folder by navigating to your bot folder and running
zip -r bot.zip .
Once you submit, our servers will automatically put your bot into matches and store all results, replays, and logs online. Go to https://ai.acmucsd.com/competitions/energium/ranks to see the current leaderboard as well as find matches and watch them.
For more options such as seeding, suppress logs, changing max computation time, use
acmai-energium --help
Keep reading to learn how the competition works and the rules of the AI game
Specs
This is a turn based, 1 vs 1 competition. Each match, two bots compete to get the most energium in store by the end of 200 turns. Each turn, your bot has a second of computation to do whatever it can to win (a second is quite a lot!) and about 1GB of RAM (you probably wont need this much). The computation times are subject to change, but will only ever increase.
You are given a Player
object that contains details on your bot's current energium stored, how many collectors it has, and the location of all of its bases. See the Starter kits bot file for details on how to access this data and send commands to run your bot.
You are also given a GameMap
object with data on all the map tiles, and the energium values of each tile.
Collectors Collectors can move in 4 directions, North, East, South, West. The starter kit shows you how to move units using the move
function.
Each collector has a breakdown level. This breakdown level resets to 0 each time the collector moves over a friendly base. As time passes, the collector slowly becomes more broken down, with the level increasing once every 10 turns. Once the breakdown level is 10, the collector malfunctions and vanishes.
If two collectors, regardless of what team they are on, end up on the same tile on the map after a turn, the collector with the least breakdown level will survive and all other collectors on the same tile will break down. If there's a tie in least breakdown level, all collectors break down.
Collectors automatically gain or lose energium depending on the energium
value stored on the tile the collector is on. This energium is then added or removed from the player's store of energium. Be wary that some tiles are severely energy defficient, and can cause you to lose more energium by standing on it. Note that energium is special in that it cannot be depleted anywhere, it will always output that much energium whenever a collector is on it.
Bases
Bases have the ability to spend Energium to produce more collector bots on top of the base to help your corporation mine even more Energium. Caution that if there is a collector already on top of a base, any new collector spawned will either break the existing collector or both collectors will break!
Packages Available and Versions Used
On the competition servers, we are using:
Node version v12.15.0.
Python 3.8.2
Java - openjdk 1.8.0_252
On the competition servers, the following packages are provided for use
For Python Bots: scipy
, numpy
, pandas
, scikit-learn
FAQ
Please join our competition discord for questions, help with bugs, installation, or general strategy talk!
https://discord.gg/XsG5etY