some dumb small implementations of learning/optimization algorithms