pathfinding in Clojure
Help, I’m stuck in a maze
Motivation
Many AoC problems required some sort of path finding - shortest path, cheapest path according to the rules of the world.
import React, {useState} from "react"; | |
import {Context, CurrentUserDetails} from "@cisco-sbgidm/ui-components"; | |
// https://security-ci.myverysecuresignon.name/.well-known/openid-configuration | |
/* | |
license: gpl-2.0 | |
border: yes | |
scrolling: no |
license: mit |
license: gpl-2.0 | |
border: yes | |
scrolling: no |
license: mit |
[ | |
"http://cdn0.vox-cdn.com/uploads/chorus_asset/file/2363952/win10filexplorer.0.png", | |
"https://images.techhive.com/images/article/2015/07/windows-10-hidden-narwhal-100598366-orig.jpg", | |
"https://cdn.windowsreport.com/wp-content/uploads/2015/12/best-windows-10-themes-10.png", | |
"https://upload.wikimedia.org/wikipedia/commons/c/cb/Fedora-Core-6-AIGLX.png", | |
"https://upload.wikimedia.org/wikipedia/commons/f/fd/Compiz-fusion.png", | |
"https://upload.wikimedia.org/wikipedia/commons/2/2a/Stumpwm.png", | |
"https://camo.githubusercontent.com/a0f864729cb308e8546bde467445dafbd71ce7ed/687474703a2f2f6c676172632e6e61726f642e72752f706963732f7877656d2f7877656d2d322e312e706e67", | |
"https://i.warosu.org/data/g/img/0636/55/1512238669552.png", | |
"http://i.imgur.com/Q6yFbn0.png", |
#!/bin/sh | |
find . -type f \( -name "#*" -or -name ".#*" -or -name "*~" \) -print -delete |
Many AoC problems required some sort of path finding - shortest path, cheapest path according to the rules of the world.
(ns sort-compare.core) | |
(def team-data | |
[{:team-id 1 | |
:total-pts 7 | |
:matches [{:schedule-id 1 :opp-team-id 2 :opp-team-pts 6 :team-points 3} | |
{:schedule-id 2 :opp-team-id 3 :opp-team-pts 6 :team-points 4}]} | |
{:team-id 2 | |
:total-pts 7 | |
:matches [{:schedule-id 1 :opp-team-id 1 :opp-team-pts 3 :team-points 6} |
(ns roll.core | |
(:require [instaparse.core :as instaparse] | |
[clojure.string :as str])) | |
(def roll-parser | |
(instaparse/parser " | |
roll = quantity? <'d'> die-type (operator operand)? | |
<quantity> = number | |
<die-type> = number | |
<operand> = number |