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
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
// 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://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
-- 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. |
NewerOlder