Skip to content

Instantly share code, notes, and snippets.

View alexbirkett's full-sized avatar

Alex Birkett alexbirkett

View GitHub Profile
@alexbirkett
alexbirkett / gist:4b0813837cf6b6a538b3
Created December 13, 2014 10:29
Code from The Singularity - feat. Ray Kurzweil & Alex Jones [RAP NEWS 28]
q1 = Q( s[t], a[t] );
qMax = 0;
for (a = 0; a < A; ++a ) {
for (s = 0; s < S; ++s ) {
q_a = Q( s, a ) * P ( s[t], s, a );
qMax = max( qMax, q_a);
}
}
q2 = q1 + alpha * ( Reward(t) + D * qMax - q1 );