A model for some set of propositions
On top of this we have a plausibility function which may equivallently be though
t of as a manifold
package com.ni.dl4j | |
import org.deeplearning4j.nn.api.Layer | |
import org.deeplearning4j.nn.modelimport.keras.KerasModelImport | |
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork | |
import org.junit.Test | |
import org.nd4j.linalg.api.ndarray.INDArray | |
import org.nd4j.linalg.factory.Nd4j | |
class TestModel { |
package com.ni.dl4j | |
import org.deeplearning4j.nn.modelimport.keras.KerasModelImport | |
import org.deeplearning4j.nn.graph.ComputationGraph | |
import org.junit.Test | |
import org.nd4j.linalg.api.ndarray.INDArray | |
import org.nd4j.linalg.factory.Nd4j | |
class TestModel { | |
@Test |
def simplex_points(n): | |
""" | |
Generates subtriangles of the 3d 0-1 simplex (tripples of tripples). | |
`n` is the number of triangles along an edge (so it total it generates a | |
number of subtriangles equal to the n'th triangular number) | |
""" | |
def down(x,y,z): | |
return (x+1, y, z-1) | |
def left(x,y,z): |
A model for some set of propositions
On top of this we have a plausibility function which may equivallently be though
t of as a manifold
import random | |
""" | |
Scenario: | |
- Toss the first coin (q) N times (do not show result) | |
for each toss: | |
- If Heads toss coin 1 M times | |
- Else toss coin 2 M times | |
- Only the series of tosses are observed | |
(e.g. (HHHT, HTHT, HHHT, HTTH)) |
Last week I talked about how I thought Haskell might be useful for | |
puzzling in Zahira. | |
This week I show you what I mean. | |
I'll write this in the literate Haskell style because I think it's fun. | |
You can get a runable version of today's post | |
[here](https://gist.githubusercontent.com/winobes/95b050b5960932f5f377/raw/96e167da618986d055091bc86cf57d04281ca24e/Potion.lhs). | |
Snape's Potion Puzzle | |
--------------------- |