This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Takes a folder as its argument. Searches for all files (must be .hlt!) in that folder, | |
calculates their Gini coefficients, and then creates a json file ('ReplayGinis.json') | |
which contains the replay names and their associated Gini coefficients. | |
""" | |
import sys, json, numpy, os | |
out = open('ReplayGinis.json', 'w') | |
out.write('{') | |
for filename in os.listdir(sys.argv[1]): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: Uses a modified version of @erdman's starter package, also contained in this gist. | |
import hlt | |
from hlt import * | |
import random | |
myID, game_map = hlt.get_init() | |
debug = open('debug.log', 'w') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Gist contains the sample code for improving the sample Halite random bot in Python 3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Gist contains the sample code for improving the sample Halite random bot in Java. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Gist contains the sample code for improving the sample Halite random bot in C++. |