Skip to content

Instantly share code, notes, and snippets.

@efirdc
efirdc / README.md
Last active February 2, 2023 07:13
Script for adding AI agents to coryefird.com/konane

Konane Online - Agent Script

Created for the A.I. course (CMPT 355) at MacEwan University.

With this script you can deploy your Konane agent at coryefird.com/konane
If your agent worked with drivercheck.pl, then it should work with this script as well.
Win/loss results of your agent will be output to a log file agent_online.log

If you have any issues getting your agent working, or if you have a working agent that you would
like to be permenantly deployed on the server then please contact me!

@efirdc
efirdc / pytorch_connected_components.py
Created June 8, 2020 01:37
Connected components in pytorch
# Demonstration: https://www.youtube.com/watch?v=5AvHrIK-Kjc&feature=youtu.be
# rand_cmap from https://stackoverflow.com/questions/14720331/how-to-generate-random-colors-in-matplotlib
import matplotlib.pyplot as plt
import torch
import torch.nn.functional as F
from visualizations import rand_cmap
W = H = 64
img = torch.randn(W, H).to(device)