This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- this is how Eq is defined in standard prelude | |
class Eq a where | |
(==) :: a -> a -> Bool | |
(/=) :: a -> a -> Bool | |
x == y = not (x /= y) | |
x /= y = not (x == y) | |
-- Anyway, we did implement the function bodies for the functions that Eq defines, only we defined them in terms of mutual recursion. We said that two instances of Eq are equal if they are not different and they are different if they are not equal. We didn't have to do this, really, but we did and we'll see how this helps us soon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://forums.aichallenge.org/viewtopic.php?f=17&t=1136 | |
We represent every program internally as an object tree, | |
very much like a compiler internally represents a program | |
after parsing and before generating executable code. | |
A compiler manipulates these objects in order to optimize | |
the code, we do it in order to randomly change the | |
code (mutation) and to insert parts of one program | |
into another (crossover). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// change com.appname with your proper path and appname | |
// build wtth Ctlr + F9 on Android Studio to generate the java classes from android annotated files | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2+' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/304614/haskell-on-windows-setup | |
This is what I have done in order to get Haskell set up on my Windows 7 x64 | |
1. Install Haskell Platform | |
Download and install the Haskell Platform from http://www.haskell.org/platform/windows.html | |
2. Install Sublime Text 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- When I have a helper function `errorTotal` seperately in a where clause as shown below I'm getting the following error. | |
gradientDescentSeperated :: | |
(Traversable f, Fractional a, Ord a) | |
=> (forall s. Reifies s Tape => f (Reverse s a) -> f (Scalar a) -> Reverse s a) | |
-> [f (Scalar a)] | |
-> f a | |
-> [f a] | |
gradientDescentSeperated errorFunction d = gradientDescent (\theta -> errorTotal theta d) | |
where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
************* Module delight.gcm_utils | |
E: 40,108: Instance of 'bool' has no 'get' member (but some types could not be inferred) (maybe-no-member) | |
E: 41,108: Instance of 'bool' has no 'get' member (but some types could not be inferred) (maybe-no-member) | |
************* Module delight.gcm | |
E:141,30: Instance of 'bool' has no 'get' member (but some types could not be inferred) (maybe-no-member) | |
E:142,15: Instance of 'bool' has no 'has_key' member (but some types could not be inferred) (maybe-no-member) | |
E:143,32: Instance of 'bool' has no 'get' member (but some types could not be inferred) (maybe-no-member) | |
E:153,34: Instance of 'bool' has no 'get' member (but some types could not be inferred) (maybe-no-member) | |
E:155,19: Instance of 'bool' has no 'has_key' member (but some types could not be inferred) (maybe-no-member) | |
E:156,60: Instance of 'bool' has no 'get' member (but some types could not be inferred) (maybe-no-member) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
semi gradient sarsa control of Mountain Car | |
with function approximation, with tiled features | |
TileCoding -> https://gist.github.com/042bb46cc9143a0c027d021c552300cf | |
""" | |
import numpy as np | |
import gym |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from osim.http.client import Client | |
from osim.env import GaitEnv | |
#from osim_http_mrl_client import Client as mrl_client | |
remote_base = 'http://grader.crowdai.org' | |
token = 'your token' | |
client = Client(remote_base) | |
g = GaitEnv(visualize=False) | |
# local = mrl_client() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Trains a simple convnet on the MNIST dataset. | |
Gets to 99.25% test accuracy after 12 epochs | |
(there is still a lot of margin for parameter tuning). | |
16 seconds per epoch on a GRID K520 GPU. | |
''' | |
from __future__ import print_function | |
import wandb | |
wandb.init() | |
from wandb.keras import WandbCallback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Trains a simple convnet on the MNIST dataset. | |
Gets to 99.25% test accuracy after 12 epochs | |
(there is still a lot of margin for parameter tuning). | |
16 seconds per epoch on a GRID K520 GPU. | |
''' | |
from __future__ import print_function | |
import wandb | |
wandb.init() | |
from wandb.keras import WandbCallback |
OlderNewer