Skip to content

Instantly share code, notes, and snippets.

@PtrMan
PtrMan / Art1.py
Last active February 19, 2021 14:17
Python implementation of Art1
# code is translated from orginal implementation from
# http://77.93.202.96/~xhudik/art/
from random import randint
class Art1(object):
def _countOnes(self, Instance):
Count = 0
for Element in Instance:
module freelist;
/*
Copyright (c) 2006 Michael D. Parker
Based upon an implementation described by Nathan Mefford in the Game Programming
Gems 5 article, "Improving Freelists with Policy Based Design".
This implementation is released into the public domain. I ask that you
please keep this header intact, though of course you do not have to.
*/
@PtrMan
PtrMan / STRIPSSolver.d
Last active December 23, 2015 16:18
STRIPS solver in D using generic to speed it up a bit
import std.stdio;
struct EnqueueDequeuePolicy;
mixin template QueueStrategy(Type, PolicyQueueStrategy : EnqueueDequeuePolicy)
{
public final void enqueue(Type Element, out bool Success)
{
this.storageEnqueue(Element, Success);
}
@PtrMan
PtrMan / agi.md
Last active August 29, 2015 14:21

There are no dimensions

NN's typical weakness is the curse of dimensionality. In reality all? information doesn't depend on the dimensions it is mapped to. For example

  • a big letter A stays a big letter A in a smaller font
  • a big circular touch sensation stays a circular touch sensation even if the circle is smaller

Ways to not run into this problem is to avoid it, for example with

  • early binding of raw data into higher level representations (line fitting, ...)
  • other representations like in NEAT, etc.

RNN vs other approaches

@PtrMan
PtrMan / gist:9f462204b6a23646dc59
Created June 7, 2015 21:19
Broken Hyperdimension Cellular Automata Model
* Cells are in a (undirectional) graph, cells can have any number of neightbors, cells can have different numbers of neightbors
* Cells calculate the next state based on a CA table with the values of their neightbors
References:
* Book (of which i dont know the name) about selforganisation in the unsere, has a example which is similar to this, but its not that formalized
Keywords:
CA, cellular automata, self organisation, emergence
import re
# http://stackoverflow.com/questions/691148/pythonic-way-to-implement-a-tokenizer
class Scanner(object):
def __init__(self):
self._scanner=re.Scanner([
(r"[0-9]+", lambda scanner,token:("INTEGER", token)),
(r"[#a-z_]+", lambda scanner,token:("IDENTIFIER", token)),
(r"[,.]+", lambda scanner,token:("PUNCTUATION", token)),
(r"\s+", None), # None == skip token.
<sseehh_> on the opencog mailnig list ben mentioned wanting to make a grid-like version of atomspace for processing image data like destin was supposed to be used for
<sseehh_> i think something similar could apply to nars
<sseehh_> a grid of inheritance terms
<sseehh_> and apply a regular inference algorithm across them uniformly
<sseehh_> below nal4 or something
<sseehh_> like today with tony's example, i confined it to level 1
<sseehh_> only inheritance statements
<SquareOfTwo__> so they gave up destin :D
<sseehh_> no idea but itamar wanted to commercialize that shit in the worst way
<SquareOfTwo__> thats bad
module Client.OpenGlContext;
import Client.opengl.gl;
import Client.opengl.glExt;
const bool WINDOWS = true;
// just for debugging
import std.stdio : writeln;
#include "bindings/Array.h"
#include <iostream>
using namespace std;
_
_V.-o
/ |`-'
(7_\\