Skip to content

Instantly share code, notes, and snippets.

View Sohojoe's full-sized avatar

Joe Booth Sohojoe

View GitHub Profile
@Sohojoe
Sohojoe / 002.py
Last active October 27, 2023 23:38
screwing around with active inference
import numpy as np
# Define the complexity terms for each action
complexity_a1 = 0.1 # Lower complexity for fixing it yourself
complexity_a2 = 0.5 # Higher complexity for asking a colleague
# Initialize beliefs and probabilities with updated values
Q_a1_dynamic = 0.5 # Initial belief that you can fix the bug yourself
Q_a2_dynamic = 0.5 # Initial belief that your colleague can fix the bug
@Sohojoe
Sohojoe / app.js
Last active October 1, 2021 03:53
const base91 = require('node-base91')
const sharp = require('sharp');
function short_rgb_to_rgba_buffer(pixels) {
var width = 16, height = 16;
// var frameData = Buffer.from(rgba)
var i = 0;
var frameData = Buffer.alloc(width * height * 4);
var frameData_idx = 0;
# from: https://github.com/thehawkgriffith/dyna-maze
import numpy as np
import os
import matplotlib.pyplot as plt
from time import sleep
StateMemory = []
ActionMemory = {}
@Sohojoe
Sohojoe / TrainingPerformance.tsv
Last active November 18, 2018 07:34
Training Performance
Environment Training Steps Training Time Steps Per Second
Hopper 4,800,000 36m 31s 2,190
Walker 4,800,000 37m 14s 2,149
Humanoid 16,000,000 3h 37m 1,229
Ant 4,800,000 35m 55s 2,359
@Sohojoe
Sohojoe / MarathonSpawner.cs
Created November 16, 2018 03:06
MarathonEnviroments fix for globalization
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UnityEngine;
namespace MLAgents
{
@Sohojoe
Sohojoe / continuous_trainer.py
Last active December 15, 2019 22:56
OpenAi.Gym.Baselines.DeepQ Restoring checkpoint in next training
import os
import subprocess
import threading
import sys
from signal import *
cur_path = os.path.dirname(os.path.realpath(__file__))
@Sohojoe
Sohojoe / .block
Last active March 27, 2017 21:03
Force Editor + Pan/Zoom
license: mit
@Sohojoe
Sohojoe / README.md
Last active March 24, 2017 20:28 — forked from jhb/README.md
Graph with labeled edges

A graph with force layout (using d3.js) and labels on edges, autorotation of those labels and arrowheads. 22

@Sohojoe
Sohojoe / main.cs
Last active January 29, 2017 06:14
argh
using System.Linq;
using ServiceStack;
using ServiceStack.Text;
using System;
using System.Threading.Tasks;
using Orions.Cloud.Client.Http;
using Orions.Cloud.Common.Data;
using System.Collections.Generic;
const string AppAccessToken = "eyJ0eXAiOiJDU1AiLCAiZW5jIjoiUlNBX09BRVAifQ.GiJl1NAy9E64OtcqoeE5NedwGylIXwK5F39m_5v0NnGm2zWmJ3x6Hhx0c65QbCZL8v2wJRe6kxTf4KYBaFohSoyu2Z-LJmJFOScSQqeUgbi62amT636Y6wIDoM84oQ23R5v2NPL8n7wwtQecx7_xa5lYgnNFDlq1pb41KXQT65I.66yEgL7AapwReAGV.jEhvqHMvF_TGr0eMIK2X1yBw2paVxUq8eW9JUlXdArISpg3cVNqcWhcSKpHvig.YB9A05OjxOCEonAOXJDXlw";
@Sohojoe
Sohojoe / App.Config
Created January 29, 2017 05:16
New Public Gist
// App.Config
// Created by Sohojoe on 2017/01/28