npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dimensions-ai/designs-halite3

v1.4.1

Published

Halite 3 Design implemented using the Dimensions framework

Downloads

9

Readme

Dimensions - Halite 3 Design

This is a typescript implementation of the Halite 3 AI competition using the Dimensions AI competition framework. This simulates the original Halite 3 game quite closely, including features such as inspiration, mining, dropoffs and more!

You can run most bots that adhere to the Halite 3 starter kits. At the moment, C++, C bots don't really work due to no support for CMake and Make at the moment. Out of the box, Java, Python, Javascript / Typescript, PHP, Go should work, as long as a install.sh file isn't used. More will be added as Dimensions supports more options.

To start, first install it

npm install dimensions-ai @dimensions-ai/designs-halite3

To run a single match, run

const Dimension = require('dimensions-ai');
const Halite3Design = require('@dimensions-ai/designs-halite3').default;

let halite3Design = new Halite3Design('Halite 3 Design');
let halite3Dimension = Dimension.create(halite3Design, {
  name: 'Halite 3', 
  loggingLevel: Dimension.Logger.LEVEL.DETAIL
});

let starterBotJS = './starter-kits/js/MyBot.js';
let starterBotPY = './starter-kits/python/MyBot.py';
halite3Dimension.runMatch(
  [starterBotJS, starterBotPY],
  {
    name: 'my-halite-match',
    loggingLevel: Dimension.Logger.LEVEL.INFO,
    replayDirectory: './replays',
  }
).then((res) => {
  console.log(res);
});

To run a trueskill ranked leaderboard like tournament, akin to the actual Halite 3 tournament, run

let Tournament = Dimension.Tournament;
let simpleBots = ["pathToBot.js", "pathToSomeOtherBot.java", "anotherBot.cpp", "anotherOne.py"];
let halite3League = halite3Dimension.createTournament(simpleBots, {
  type: Tournament.Type.LADDER, // specify ladder/leaderboard tournament
  rankSystem: Tournament.RankSystem.TRUESKILL, // specify to use trueskill for ranking
  loggingLevel: Dimension.Logger.LEVEL.INFO,
  defaultMatchConfigs: {
    replayDirectory: './replays',
    loggingLevel: Dimension.Logger.LEVEL.ERROR,
  },
  agentsPerMatch: [2, 4], // specify that only 2 or 4 players can compete at the same time
  resultHandler: Halite3Design.trueskillResultHandler // use the trueskill result handler
});
halite3League.run();

For full details on how to run custom matches and tournaments, make sure to check out https://github.com/stonet2000/dimensions for details on how to run them.

Replays are automatically saved to the root folder. You can specify the replayDirectory field to give a directory to store replays in. To watch them, you can upload them to the online Halite 3 client at https://2018.halite.io/watch-games

There are only a few features left out (that I know of at least). Error logs are not saved anywhere at this time, they are only printed to console if you set logging to a level of Logger.LEVEL.WARN or higher

I'm open to any contributions if you would like to fix/add something to this! Just open an issue or a PR