<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ole Kröger</title>
    <description>The latest articles on DEV Community by Ole Kröger (@wikunia).</description>
    <link>https://dev.to/wikunia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F83391%2Fe45856b5-2463-4c88-a128-e866cb846f2a.png</url>
      <title>DEV Community: Ole Kröger</title>
      <link>https://dev.to/wikunia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wikunia"/>
    <language>en</language>
    <item>
      <title>Building a constraint programming solver in Julia</title>
      <dc:creator>Ole Kröger</dc:creator>
      <pubDate>Wed, 04 Sep 2019 22:00:00 +0000</pubDate>
      <link>https://dev.to/wikunia/building-a-constraint-programming-solver-in-julia-2e80</link>
      <guid>https://dev.to/wikunia/building-a-constraint-programming-solver-in-julia-2e80</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fopensourc.es%2Fimages%2Fa%2Fe%2F5%2F2%2F7%2Fae52753e2acf811c854573c253cf50bdba14b253-cover.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fopensourc.es%2Fimages%2Fa%2Fe%2F5%2F2%2F7%2Fae52753e2acf811c854573c253cf50bdba14b253-cover.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More than 2 years ago I wrote a &lt;a href="https://dev.to/blog/sudoku"&gt;Sudoku solver in Python&lt;/a&gt;. I really enjoyed it and therefore I've spend some time to do the same in Julia just faster ;) Then I wanted to build a whole constraint-programming solver in Julia. Well I actually still want to do it. It will be hard but fun. I want to share my way on my blog and instead of writing when I've done something I want to share my journey while I'm doing it.&lt;/p&gt;

&lt;p&gt;Additionally the blog should be as simple as possible and everyone should be able to follow step by step.&lt;/p&gt;

&lt;p&gt;In my dream we are building this together so if there is someone out there who is crazy and wants to build a constraint-programming solver from scratch... Send me a mail (&lt;a href="mailto:o.kroeger@opensourc.es"&gt;o.kroeger@opensourc.es&lt;/a&gt;) and/or comment on this post.&lt;/p&gt;

&lt;p&gt;In this first post I'll create the package and create test cases as well as building the most basic solver using backtracking. In the next stages we will build the &lt;code&gt;alldifferent&lt;/code&gt;, &lt;code&gt;straights&lt;/code&gt;, &lt;code&gt;sum&lt;/code&gt; constraint and so on together. The next post will be similar to the previous Sudoku post but with animation and of course written in Julia.&lt;/p&gt;

&lt;p&gt;Let's get started:&lt;/p&gt;

&lt;p&gt;First we create a package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;julia
(v1.2) pkg&amp;gt; generate ConstraintSolver
Generating project ConstraintSolver:
    ConstraintSolver/Project.toml
    ConstraintSolver/src/ConstraintSolver.jl

(v1.2) pkg&amp;gt; activate ConstraintSolver/
Activating environment at `~/Julia/ConstraintSolver/Project.toml`

(v1.2) pkg&amp;gt; develop .
 Resolving package versions...
  Updating `~/.julia/environments/v1.2/Project.toml`
  [e0e52ebd] + ConstraintSolver v0.1.0 [`../../../Julia/ConstraintSolver`]
  Updating `~/.julia/environments/v1.2/Manifest.toml`
  [e0e52ebd] + ConstraintSolver v0.1.0 [`../../../Julia/ConstraintSolver`]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Info:&lt;/strong&gt; You get to the package mode with &lt;code&gt;]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I want to have a git repository for the project and we can do this inside the julia shell as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;shell&amp;gt; cd ConstraintSolver/
/home/ole/Julia/ConstraintSolver

shell&amp;gt; git init
Initialized empty Git repository in /home/ole/Julia/ConstraintSolver/.git/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Info:&lt;/strong&gt; You get to the shell mode with &lt;code&gt;;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The next thing for me is always to create a simple test file which I call &lt;code&gt;current.jl&lt;/code&gt; which is inside &lt;code&gt;.gitignore&lt;/code&gt; so that I can test the same thing on different branches.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;shell&amp;gt; mkdir test
shell&amp;gt; touch test/current.jl
shell&amp;gt; vim .gitignore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now before we do something like loading modules I would advise to use &lt;a href="https://github.com/timholy/Revise.jl" rel="noopener noreferrer"&gt;Revise&lt;/a&gt; which helps in general to avoid reloading the REPL when we change code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;julia&amp;gt; using Revise
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;current.jl&lt;/code&gt; file is not a real test it's more like a playground.&lt;/p&gt;

&lt;p&gt;Inside I wrote:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using ConstraintSolver

CS = ConstraintSolver
include("sudoku_fcts.jl")

function main()
    com = CS.init()

    grid = zeros(Int8,(9,9))
    grid[1,:] = [0 0 0 5 4 6 0 0 9]
    grid[2,:] = [0 2 0 0 0 0 0 0 7]
    grid[3,:] = [0 0 3 9 0 0 0 0 4]
    grid[4,:] = [9 0 5 0 0 0 0 7 0]
    grid[5,:] = [7 0 0 0 0 0 0 2 0]
    grid[6,:] = [0 0 0 0 9 3 0 0 0]
    grid[7,:] = [0 5 6 0 0 8 0 0 0]
    grid[8,:] = [0 1 0 0 3 9 0 0 0]
    grid[9,:] = [0 0 0 0 0 0 8 0...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read full post at &lt;a href="https://opensourc.es/blog/constraint-solver-1" rel="noopener noreferrer"&gt;opensourc.es&lt;/a&gt;&lt;/p&gt;

</description>
      <category>julia</category>
      <category>sudoku</category>
      <category>constraintprogramming</category>
    </item>
    <item>
      <title>Neuromorphic computing: An Overview</title>
      <dc:creator>Ole Kröger</dc:creator>
      <pubDate>Mon, 17 Jun 2019 22:00:00 +0000</pubDate>
      <link>https://dev.to/wikunia/neuromorphic-computing-an-overview-4d64</link>
      <guid>https://dev.to/wikunia/neuromorphic-computing-an-overview-4d64</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mawSmOsd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://opensourc.es/images/a/5/8/3/6/a5836bdcbc50638ae8d2c2c14c8de0529c674d53-cover.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mawSmOsd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://opensourc.es/images/a/5/8/3/6/a5836bdcbc50638ae8d2c2c14c8de0529c674d53-cover.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a different blog post than my normal ones. There will most likely be no code (okay there is no code...) and therefore no repository on this one.I'm currently preparing a seminar talk for this topic and find it quite interesting but also relatively complicated. This post is trying to give you an idea about what neuromorphic computing is. Why does it exist? Will it change the world of computing?There will be a some literature references in this post and if you enjoy such non coding posts and hope I'll enjoy writing it :D then I'll consider writing more of these kind. (Writing it was quite nice ;) )&lt;/p&gt;

&lt;p&gt;Okay let's begin. What is neuromorphic computing? The idea is basically to make a brain model to understand the human brain better. We wanted to have AI and then we thought okay we know one intelligent creature on this world (whatever intelligent really means) and that is us humans but this idea didn't work out that great mostly because someone found a different way to create something similar which is called deep neural networks. They are easy to train using backpropagation but they have nothing to do with how our brains work. It's similar to airplanes in comparison with birds. They work well but they aren't really biologically inspired. We aren't only interested in creating an AI we are also interested in a better understanding of our own body and especially brain. Which means it is still quite interesting to get back to neuromorphic computing and give it another shot.&lt;/p&gt;

&lt;h3&gt;
  
  
  Brain vs Deep neural network
&lt;/h3&gt;

&lt;p&gt;I wrote a bit about &lt;a href="https://opensourc.es/blog/first-steps"&gt;neural networks&lt;/a&gt; on my blog. The general idea is that we have some layers with some neurons and they are all connected to the next layer (fully connected network). The first layer connects to the first hidden layer and the last hidden layer connects to the output layer. The connections have some weights and to obtain the output we go from input layer to output layer and do some matrix matrix multiplications. In general our neural network model is extremely simple and organized and everything flows in one direction. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--190BHuCT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://upload.wikimedia.org/wikipedia/commons/4/46/Colored_neural_network.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--190BHuCT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://upload.wikimedia.org/wikipedia/commons/4/46/Colored_neural_network.svg" alt="Neural network (Wikipedia)"&gt;&lt;/a&gt;Source: &lt;a href="https://en.wikipedia.org/wiki/Artificial_neural_network"&gt;Wikipedia: Artificial neural network&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In comparison the brain: We have a bunch of neurons "floating" around. Those are connected to each other in a more random like fashion and there is no direction (it is still a directed graph, but they aren't organized in layers). Additionally artificial neural networks are working with floating point numbers i.e if the input is 0.3 and the weight is 0.2 we get 0.06 as a result input to the next neuron add it up with all the other inputs and then send it over to the next layer. The brain has a different technique. Neurons have more or less two states: They either fire or they chill. That is binary and our computer model uses those complicated floating point numbers. Why???Good question! The point is that our brain works using time,...&lt;/p&gt;

&lt;p&gt;Read the full article &lt;a href="https://opensourc.es/blog/neuromorphic"&gt;here&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;No worries it's free ;)&lt;/p&gt;

</description>
      <category>neuromorphic</category>
    </item>
  </channel>
</rss>
