<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
  <url>
    <loc>https://www.barancan.de/blog</loc>
    <changefreq>daily</changefreq>
    <priority>0.75</priority>
    <lastmod>2020-09-17</lastmod>
  </url>
  <url>
    <loc>https://www.barancan.de/blog/writing-a-simple-chess-engine-in-c</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2020-08-31</lastmod>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4cdbea0acc3a6197b5061d/1598872584190/anim.gif</image:loc>
      <image:title>Blog - Writing a Simple Chess-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4cdd8014aac00fb022b5ef/1598872970291/interface.PNG</image:loc>
      <image:title>Blog - Writing a Simple Chess-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4cdd37b40a3222694c5722/1598872893276/eval.PNG</image:loc>
      <image:title>Blog - Writing a Simple Chess-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4cdcbcf0feca27412c37fe/1598872765970/</image:loc>
      <image:title>Blog - Writing a Simple Chess-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4cdbb49cb980774543f4b6/1598872508311/ConsoleBoard.png</image:loc>
      <image:title>Blog - Writing a Simple Chess-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4cdce61eaeb065d4e906f7/1598872819274/pieceCode.PNG</image:loc>
      <image:title>Blog - Writing a Simple Chess-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4cdc904ada6c4dfa16f2a6/1598872724915/codesample.png</image:loc>
      <image:title>Blog - Writing a Simple Chess-Engine in C++</image:title>
      <image:caption>This is what the outcome looks like. The process of implementing a GUI is not as simple as it was several years ago when I used Delphi (which was pretty much a drag-and-drop sandbox for GUI programming). However, the basic principle is still pretty intuitive: Create objects representing UI elements and then define event handlers for them. To enable interaction with the chess pieces, the program uses an OnClick-event on the chess board and a state machine would take care of the rest. For example, if a piece had already been selected and an empty square is clicked, it is checked whether this represents a legal move, and if it does, it is executed (we'll get to the actual rules of the game in a bit).</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4cdd58511e4f509fb1bb61/1598872929259/quiescence.PNG</image:loc>
      <image:title>Blog - Writing a Simple Chess-Engine in C++ - Quiescence Search</image:title>
      <image:caption>There were about 360.000 normal nodes visited, versus over 8 million nodes at the horizon. The runtime is dominated by quiescence searches unless we restrict the time spent on quiescence searches. In practice, the quiescence search can be cut off after a fixed additional depth, e.g. 2 in the above case for white.</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4cddb47960e8706cc5b2cd/1598873019300/nodeCount.PNG</image:loc>
      <image:title>Blog - Writing a Simple Chess-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4cdd1a0ce42f136e7f9c9f/1598872864513/moveData.PNG</image:loc>
      <image:title>Blog - Writing a Simple Chess-Engine in C++</image:title>
    </image:image>
  </url>
  <url>
    <loc>https://www.barancan.de/blog/writing-a-simple-minesweeper-engine-in-python</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2020-08-31</lastmod>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce108818ebd25224fec2d/1598873871114/subsets.png</image:loc>
      <image:title>Blog - Writing a Simple Minesweeper-Engine in Python</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce0990acc3a6197b56bc1/1598873762275/representation.png</image:loc>
      <image:title>Blog - Writing a Simple Minesweeper-Engine in Python</image:title>
      <image:caption>{A,B,C} -&gt; 2 {A,C,D,E} -&gt; 1 {D,E,F,G} -&gt; 1</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce0d29cb9807745447476/1598873819079/singlecell.png</image:loc>
      <image:title>Blog - Writing a Simple Minesweeper-Engine in Python</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce149ceb27e4afeb2781b/1598873945184/Anim.gif</image:loc>
      <image:title>Blog - Writing a Simple Minesweeper-Engine in Python</image:title>
    </image:image>
  </url>
  <url>
    <loc>https://www.barancan.de/blog/writing-a-stronger-minesweeper-engine-in-c</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2020-08-31</lastmod>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce57ef746364c22304637/1598875017221/NaiveFormula.gif</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce3ee4ada6c4dfa17786f/1598874802616/Speedtest.gif</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
      <image:caption>Phrased differently, that means about 2 games per second versus about 800 games per second.</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce5e0af92cf4f858ea063/1598875176338/HEADER.gif</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce3797c705f134163d94b/1598874525366/OneWaySearch-Enough+Samples.gif</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
      <image:caption>This illustrates the recursive search along the uppermost connected component. Lastly, once this backtracking search is completed for all components:</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce2f91f88f957d3ee5613/1598874367363/OffBoundaryCorrection+2.png</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce270b40a3222694cbd4e/1598874228970/meanwinrate_0nb.png</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce4e17960e8706cc63f6f/1598874869272/</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
      <image:caption>Let us first consider the naïve "maximum constraint" method. My initial Python implementation took on average 0.45 seconds per game on “Intermediate” difficulty, while the C++ implementation took 0.00127 seconds.</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce315ceb27e4afeb29bf0/1598874403944/OneWaySearch-Enough+Samples_cropped.gif</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce5461eaeb065d4e9c5eb/1598874972028/boundary.PNG</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
      <image:caption>To visualize this process, consider the below game state, with the constrained cells along the boundary highlighted in cyan. These cells as well as the boundary are demarcated by red lines; Note that – and this is essential for an efficient implementation – there are 6 connected components which can be solved individually; These components are segregated by virtue of not having a common constraint.</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce28914aac00fb0232ca2/1598874257399/algoComparison.PNG</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce252818ebd2522500935/1598874213260/meanwinrate_no0nb.png</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4ce596b40a3222694d0820/1598875031818/example.png</image:loc>
      <image:title>Blog - Writing a Stronger Minesweeper-Engine in C++</image:title>
    </image:image>
  </url>
  <url>
    <loc>https://www.barancan.de/about</loc>
    <changefreq>daily</changefreq>
    <priority>0.75</priority>
    <lastmod>2020-08-31</lastmod>
  </url>
  <url>
    <loc>https://www.barancan.de/projects</loc>
    <changefreq>daily</changefreq>
    <priority>1.0</priority>
    <lastmod>2020-08-31</lastmod>
  </url>
  <url>
    <loc>https://www.barancan.de/projects/pychess-24h8l</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2020-08-31</lastmod>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4d73770985a86d0a4e541a/1598911362875/PyChess.PNG</image:loc>
      <image:title>Projects - PyChess (Python) - A Chess game and engine on the Python-command line.</image:title>
      <image:caption>Link to GitHub. This project was later followed by ConsoleChess and then Pugs versus Bears, both of which are written in C++ and more powerful - the differential in speed was quite noticeable. This version averaged about 30 kilonodes per second on my machine (i5-9300H), versus about 2.000 kilonodes in C++. That said, there are potentially some improvements than can be made to the Python-codebase as I was more performance-conscious when designing the C++ algorithms.</image:caption>
    </image:image>
  </url>
  <url>
    <loc>https://www.barancan.de/projects/crystals-apwkc</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2020-08-31</lastmod>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/5f29d5e79d9c8c1f18ae7048/5f29d72c34753f72cbcb53c5/1596577667478/88718024mag_SeahorseValley_1kx1k_50kIt.png</image:loc>
      <image:title>Projects - Mandelbrot (Delphi)</image:title>
      <image:caption>Dubbed the "seahorse valley"</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/5f29d5e79d9c8c1f18ae7048/5f29d6cf3bb979548f59634b/1596579596358/mandelbrot_satellite_1billionMags.JPG</image:loc>
      <image:title>Projects - Mandelbrot (Delphi)</image:title>
      <image:caption>The colour palette was configured to fit each "segment" of the spiral</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/5f29d5e79d9c8c1f18ae7048/5f29d6346d28c312924e5b51/1596577372145/mandelbrot-oddstructure2.JPG</image:loc>
      <image:title>Projects - Mandelbrot (Delphi)</image:title>
      <image:caption>A satellite surrounded by four main spirals</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/5f29d5e79d9c8c1f18ae7048/5f29d76d821e4634d3a98d9d/1596577719031/mandelbrot-black+spots-colorz.jpg</image:loc>
      <image:title>Projects - Mandelbrot (Delphi)</image:title>
      <image:caption>Black holes: What happens if the iteration threshold (i.e. the computation detail) is set too low for the zoom depth</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/5f29d5e79d9c8c1f18ae7048/5f29d80d9d9c8c1f18aed895/1596577849595/dark_spiral_small.png</image:loc>
      <image:title>Projects - Mandelbrot (Delphi)</image:title>
      <image:caption>A single spiral, which will reveal an infinitude of further spirals when zoomed in</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/5f29d5e79d9c8c1f18ae7048/5f29d8d041f7af3931310e39/1596578049356/satellite.jpg</image:loc>
      <image:title>Projects - Mandelbrot (Delphi)</image:title>
      <image:caption>A satellite, perfectly symmetric along the im=0 axis</image:caption>
    </image:image>
  </url>
  <url>
    <loc>https://www.barancan.de/projects/pugsvbears-77me4</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2020-08-31</lastmod>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f29c8a7540ac831ec10eb23/1596573895771/anim.gif</image:loc>
      <image:title>Projects - Pugs versus Bears (C++)</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f29c653672fd139aebcd123/1596573278750/Screenshot2.png</image:loc>
      <image:title>Projects - Pugs versus Bears (C++)</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f29cb56bcdedd53eb500537/1596574560810/Screenshot1.jpg</image:loc>
      <image:title>Projects - Pugs versus Bears (C++)</image:title>
    </image:image>
  </url>
  <url>
    <loc>https://www.barancan.de/projects/pysweeper-kktm6</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2020-08-31</lastmod>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f29d0ca6cfce11e0e70c8f1/1596575959761/Large+JPG-Aro+Ha_0380.jpg</image:loc>
      <image:title>Projects - PySweeper (Python)</image:title>
    </image:image>
  </url>
  <url>
    <loc>https://www.barancan.de/projects/seafaring-35wlf</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2020-08-31</lastmod>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4d4c869bb95a41a73f8204/1598901420753/dropping2.gif</image:loc>
      <image:title>Projects - Dropping Balls (C++)</image:title>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4d4fdb12b6473c85eb850d/1598911719694/dropping_sandbox.gif</image:loc>
      <image:title>Projects - Dropping Balls (C++) - Sandbox Mode</image:title>
      <image:caption>One issue I had to work around was the predictability: As you can see on the left-hand side, each shot ball should follow a perfectly predictable trajectory. The problem I encountered was that, when the physics engine allows for objects to overlap from one frame to the next, the collision response can vary ever so slightly - and these errors compound. To mitigate this issue, I decoupled the resolution of the physics engine from the current framerate, meaning that updates to the system’s properties are made at fixed timesteps. This makes the trajectory uniform and perfectly predictable/replicable, but brings with it some issues on its own right (namely, the objects will no longer move in perfect realtime - the physics engine “overshoots” the actual elapsed time since the last frame). A perfect solution would compute the exact time of collision, which is a feature yet to implement. Note that conservation of momentum is not satisfied here because there are immovable objects - those for which there is no change in momentum after a collision. In sandbox mode, some physical properties like gravity, drag and elasticity can be altered. See the next picture:</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4d51f640110f1a8955a6e3/1598902844242/dropping_sandbox_gravity.gif</image:loc>
      <image:title>Projects - Dropping Balls (C++) - Disturbing a system without gravity..</image:title>
      <image:caption>..and then reintroducing gravitational force</image:caption>
    </image:image>
  </url>
  <url>
    <loc>https://www.barancan.de/projects/pymaze-s9l6z</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2020-08-31</lastmod>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4d5818e270a2239a0e1e57/1598907411325/Aro%252BHa_0010.jpg</image:loc>
      <image:title>Projects - PyMaze (Python) - A Maze-Generating Script in Python</image:title>
      <image:caption>Link to GitHub. Inspiration for this tiny project was drawn from this video, with some modifications. It was mentioned that the algorithm can be expanded on, for example by generating long hallways - I did so by introducing the option of a long hallway bias, see the picture in the section below. Moreover, instead of implementing my own stack pointer, I chose a simpler route by simply invoking recursive function calls to carve out a maze path. This is essentially a backtracking algorithm. Moreover, I changed it from C++ to Python. The parameters like maze size are set via global variables at the very top. What I find intriguing about this algorithm is the beauty in its simplicity. It really is an easy algorithm to implement, yet it solves a seemingly nontrivial problem in that it is guaranteed that every point inside the maze can be reached from anywhere else. The script simply generates a random number at each position to represent a new direction, and then it goes there - as long as this next position has not been visited yet. The current path is stored on a stack structure and whenever there is no way to go, the algorithm returns back along the stack.</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4d64f25267f4501bcda50a/1598907665692/pymaze_longhallway.gif</image:loc>
      <image:title>Projects - PyMaze (Python) - Generating Long Hallways</image:title>
      <image:caption>The random number governing the next direction of the path carving-algorithm is biased towards the previous taken direction.</image:caption>
    </image:image>
  </url>
  <url>
    <loc>https://www.barancan.de/projects/c-cppsweeper</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2020-08-31</lastmod>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f4d55dfe33090343777f6ef/1598903948961/Aro+Ha_0010.jpg</image:loc>
      <image:title>Projects - CppSweeper (C++) - A Minesweeper-AI in C++</image:title>
      <image:caption>My blog post contains more detail on this project. In brief, this was an expansion of the initial Python-implementation: The idea was to make a more performant solver, both in terms of speed as well as win rate.</image:caption>
    </image:image>
  </url>
  <url>
    <loc>https://www.barancan.de/projects/hopf-fibration-javascript</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2020-10-07</lastmod>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f6f40cc641b936671e5e497/1601127660263/hopf4.gif</image:loc>
      <image:title>Projects - Hopf Fibration (JavaScript) - Hopf Fibration</image:title>
      <image:caption>Discovered in 1931 by Heinz Hopf, it is an important mapping from the Hypersphere to the 2-sphere and an early example of a Fiber Bundle. Here, points on the 2-sphere correspond to circles on the Hypersphere in 4 dimensions, and projecting those circles back into 3-dimensions gives rise to an intricate structure of space-filling, mutually interlinked circles. For a mathematical introduction, see this article The program was written in JavaScript. Source code on github Rendering is based on Three.js/WebGL</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://static1.squarespace.com/static/5f298d5438b7de21cdb257ce/t/5f6f4202641b936671e6032e/1601126938269/hopf2.gif</image:loc>
      <image:title>Projects - Hopf Fibration (JavaScript)</image:title>
    </image:image>
  </url>
  <url>
    <loc>https://www.barancan.de/projects/fourier-series-javascript</loc>
    <changefreq>monthly</changefreq>
    <priority>0.5</priority>
    <lastmod>2021-01-25</lastmod>
  </url>
</urlset>

