Skip to content

Commit 222cd2e

Browse files
committed
publish
1 parent 36c337f commit 222cd2e

File tree

458 files changed

+9231
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

458 files changed

+9231
-0
lines changed

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [mxgmn]

CITATION.cff

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cff-version: 1.1.0
2+
message: "citation"
3+
authors:
4+
- family-names: Gumin
5+
given-names: Maxim
6+
title: MarkovJunior, a probabilistic programming language based on pattern matching and constraint propagation
7+
version: 1.0
8+
date-released: 2022-06-01
9+
keywords:
10+
- probabilistic programming
11+
- procedural generation
12+
- constraint satisfaction
13+
- language
14+
url: https://github.com/mxgmn/MarkovJunior

MarkovJunior.csproj

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
7+
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="System.Drawing.Common" Version="4.5.1" />
12+
</ItemGroup>
13+
14+
</Project>

README.md

+242

images/Apartemazements.gif

1000 KB

images/Basic.gif

62.1 KB

images/Circuit.gif

772 KB

images/CompleteSAW.gif

52.9 KB

images/DungeonGrowth.gif

128 KB

images/Flowers.gif

223 KB

images/Growth.gif

95.2 KB

images/LoopErasedWalk.gif

53.9 KB

images/MazeBacktracker.gif

30.8 KB

images/MazeGrowth.gif

28.8 KB

images/MazeGrowth.png

53.4 KB

images/NystromDungeon.gif

148 KB

images/RegularSAW.gif

17.4 KB

images/River.gif

316 KB

images/SokobanLevel1.gif

29.8 KB

images/StairsPath.gif

455 KB

images/Trail.gif

55.3 KB

images/Wilson.gif

214 KB

images/cold.gif

20 KB

images/coldest.gif

18.7 KB

images/hot.gif

30.5 KB

images/hottest.gif

25.6 KB

images/multisokoban.gif

915 KB

images/palette.png

4.91 KB

images/ps-for-procgen.jpg

76.4 KB

images/top-1764.png

3.63 MB

images/top-882.png

1.34 MB

images/top-iso.gif

2.67 MB

images/top-mv.gif

3.61 MB

models.xml

+167
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
<models>
2+
<model name="Apartemazements" size="8" d="3" amount="4"/>
3+
<model name="Apartemazements" size="8" d="3" iso="True" pixelsize="6" gui="150"/>
4+
<model name="CarmaTower" length="12" width="12" height="18"/>
5+
<model name="CarmaTower" length="12" width="12" height="18" iso="True" amount="1"/>
6+
<model name="ModernHouse" length="9" width="9" height="4" amount="4"/>
7+
<model name="ModernHouse" length="9" width="9" height="4" iso="True"/>
8+
<model name="SeaVilla" length="10" width="10" height="4" amount="4"/>
9+
<model name="SeaVilla" length="10" width="10" height="4" iso="True"/>
10+
11+
<model name="Backtracker" size="89"/>
12+
<model name="BacktrackerCycle" size="59"/>
13+
<model name="Basic" size="60" steps="1000"/>
14+
<model name="BasicBrickWall" size="30"/>
15+
<model name="BasicDijkstraDungeon" size="60"/>
16+
<model name="BasicDijkstraFill" size="60"/>
17+
<model name="BasicDungeonGrowth" size="59"/>
18+
<model name="BasicPartitioning" size="60" steps="1000"/>
19+
<model name="BernoulliPercolation" size="359"/>
20+
<model name="BiasedGrowth" size="120" steps="1000"/>
21+
<model name="BiasedGrowthContraction" size="120" steps="5000"/>
22+
<model name="BiasedMazeGrowth" size="117" steps="400"/>
23+
<model name="BiasedVoronoi" size="80" steps="1000"/>
24+
<model name="BishopParity" size="60"/>
25+
<model name="BlueNoise" size="80" steps="500"/>
26+
<model name="Cave" size="60"/>
27+
<model name="CaveContour" size="80"/>
28+
<model name="CentralCrawlers" size="60" steps="300"/>
29+
<model name="CentralSAW" size="59"/>
30+
<model name="ChainDungeon" size="60"/>
31+
<model name="ChainDungeonMaze" size="60"/>
32+
<model name="ChainMaze" size="60"/>
33+
<model name="Circuit" size="59" steps="1200"/>
34+
<model name="ClosedSurface" size="12" d="3"/>
35+
<model name="ColoredKnots" size="12" d="3"/>
36+
<model name="CompleteSAW" size="19"/>
37+
<model name="CompleteSAWSmart" size="23"/>
38+
<model name="ConnectedCaves" size="60"/>
39+
<model name="ConstrainedCaves" size="60"/>
40+
<model name="Counting" size="8" d="3"/>
41+
<model name="Coupling" size="80"/>
42+
<model name="CrawlersChase" size="60" steps="200"/>
43+
<model name="CrossCountry" size="80"/>
44+
<model name="Cycles" size="59"/>
45+
<model name="DenseSAW" size="59" amount="4"/>
46+
<model name="DiagonalPath" size="80"/>
47+
<model name="Digger" size="359" steps="50000"/>
48+
<model name="DijkstraDungeon" size="40" amount="4"/>
49+
<model name="DualRetraction" size="59"/>
50+
<model name="DualRetraction3D" size="27" d="3"/>
51+
<model name="DungeonGrowth" size="79" amount="4"/>
52+
<model name="Dwarves" size="20" steps="85"/>
53+
<model name="Escher" size="8" d="3"/>
54+
<model name="EscherSurface" size="8" d="3"/>
55+
<model name="EuclideanPath" size="80"/>
56+
<model name="FindLongCycle" size="27" pixelsize="10"/>
57+
<model name="FireNoise" size="300"/>
58+
<model name="Flowers" size="60"/>
59+
<model name="ForestFire" size="600" steps="80" pixelsize="1"/>
60+
<model name="ForestFireCA" size="600" steps="80" pixelsize="1"/>
61+
<model name="GameOfLife" size="120" steps="100"/>
62+
<model name="Growth" size="359" steps="40000"/>
63+
<model name="Growth" size="29" d="3" steps="3000"/>
64+
<model name="GrowthCompetition" size="80" steps="30000"/>
65+
<model name="GrowthContraction" size="79" steps="10000"/>
66+
<model name="GrowthWalk" size="79" steps="5000"/>
67+
<model name="GrowTo" size="120" steps="2000"/>
68+
<model name="HamiltonianPath" size="39" steps="150000"/>
69+
<model name="HamiltonianPaths" size="39" steps="1000"/>
70+
<model name="Hills" length="40" width="40" height="12" d="3"/>
71+
<model name="IrregularMazeGrowth" size="79"/>
72+
<model name="IrregularSAW" size="79"/>
73+
<model name="Keys" size="33"/>
74+
<model name="Keys" size="23" d="3"/>
75+
<model name="KnightPatrol" size="60" steps="200"/>
76+
<model name="Knots2D" size="12"/>
77+
<model name="Knots3D" size="8" d="3"/>
78+
<model name="Laplace" size="60" steps="1000"/>
79+
<model name="LoopGrowth" size="37"/>
80+
<model name="MarchingSquares" size="20"/>
81+
<model name="MazeBacktracker" size="359" steps="20000"/>
82+
<model name="MazeBacktracker" size="967" pixelsize="1" steps="200000"/>
83+
<model name="MazeGrowth" size="359"/>
84+
<model name="MazeGrowth" size="27" d="3"/>
85+
<model name="MazeMap" size="30"/>
86+
<model name="MazeTrail" size="59" steps="1000"/>
87+
<model name="MazeTrail" size="27" d="3" steps="1000"/>
88+
<model name="NestedGrowth" size="80" steps="100"/>
89+
<model name="NoDeadEnds" size="39"/>
90+
<model name="NoDeadEnds" size="19" d="3"/>
91+
<model name="Noise" size="80"/>
92+
<model name="Noise" size="24" d="3"/>
93+
<model name="NystromDungeon" size="39" amount="4" pixelsize="8" gui="150"/>
94+
<model name="OddScale" size="8"/>
95+
<model name="OddScale3D" size="8" d="3"/>
96+
<model name="OpenCave" size="80"/>
97+
<model name="OpenCave3D" size="40" d="3"/>
98+
<model name="OrganicMechanic" size="30" steps="200"/>
99+
<model name="OrientedEscher" size="6" d="3"/>
100+
<model name="PaintCompetition" size="48" steps="400"/>
101+
<model name="ParallelGrowth" size="29" d="3" steps="24"/>
102+
<model name="ParallelMazeGrowth" size="179"/>
103+
<model name="Partitioning" length="11" width="11" height="3"/>
104+
<model name="Percolation" size="360"/>
105+
<model name="PeriodicEscher" size="8" d="3"/>
106+
<model name="PillarsOfEternity" size="9" d="3"/>
107+
<model name="Push" size="40" steps="8000"/>
108+
<model name="PutColoredLs" size="30"/>
109+
<model name="PutLs" size="50"/>
110+
<model name="RegularPath" size="79"/>
111+
<model name="RegularSAW" size="39"/>
112+
<model name="RegularSAW" size="19" d="3"/>
113+
<model name="RegularSAWRestart" size="39"/>
114+
<model name="RegularSAWRestart" size="19" d="3"/>
115+
<model name="River" size="80" amount="4"/>
116+
<model name="River" size="20" d="3" amount="1"/>
117+
<model name="SAWRestart" size="79" steps="2000"/>
118+
<model name="SelectLargeCaves" size="60"/>
119+
<model name="SelectLongKnots" size="10" d="3"/>
120+
<model name="SelfAvoidingWalk" size="39"/>
121+
<model name="Sewers" size="40"/>
122+
<model name="SmarterDigger" size="40" steps="800"/>
123+
<model name="SmartSAW" size="19"/>
124+
<model name="SmoothTrail" size="59"/>
125+
<model name="SnellLaw" size="80"/>
126+
<model name="SoftPath" size="180"/>
127+
<model name="SoftPath" size="80" d="3"/>
128+
<model name="StairsPath" size="33" d="3"/>
129+
<model name="StochasticVoronoi" size="200"/>
130+
<model name="StochasticVoronoi" size="50" d="3" steps="-1"/>
131+
<model name="StormySnellLaw" size="120"/>
132+
<model name="StrangeNoise" size="60" steps="500"/>
133+
<model name="StrangeDungeon" size="59"/>
134+
<model name="StrangeDungeon" size="29" d="3"/>
135+
<model name="StrangeGrowth" size="59" steps="700"/>
136+
<model name="SubmergedKnots" size="12" d="3"/>
137+
<model name="Surface" size="10" d="3"/>
138+
<model name="Tetris" size="30" steps="1500"/>
139+
<model name="TileDungeon" size="12" amount="4"/>
140+
<model name="Trail" size="59" steps="3000"/>
141+
<model name="Voronoi" size="240"/>
142+
<model name="Voronoi" size="60" d="3"/>
143+
<model name="WaveBrickWall" size="50"/>
144+
<model name="WaveDungeon" size="50"/>
145+
<model name="WaveFlowers" size="60"/>
146+
<model name="WolfBasedApproach" size="70" steps="300"/>
147+
148+
gifs
149+
<!--<model name="Wilson" size="59" steps="1000" gui="150" gif="True"/>-->
150+
<!--<model name="BasicSnake" size="23" steps="100" gif="True"/>-->
151+
<!--<model name="Chase" size="60" steps="200" gif="True"/>-->
152+
153+
<!--<model name="MultiSokoban9" size="9" amount="1" pixelsize="20" gif="True"/>-->
154+
<!--<model name="MultiSokoban8" size="8" amount="1" pixelsize="20" gif="True"/>-->
155+
<!--<model name="SokobanLevel1" length="14" width="9" amount="1" pixelsize="21" gif="True"/>-->
156+
<!--<model name="SokobanLevel2" length="5" width="4" amount="1" pixelsize="21" gif="True"/>-->
157+
<!--<model name="SequentialSokoban" size="20" gif="True"/>-->
158+
159+
benchmarks
160+
<!--<model name="MazeGrowth" size="967" amount="20" pixelsize="1" steps="200000"/> 1.7-->
161+
<!--<model name="ParallelMazeGrowth" size="967" amount="20" pixelsize="1"/> 2.0-->
162+
<!--<model name="MazeBacktracker" size="967" amount="20" pixelsize="1" steps="200000"/> 2.3-->
163+
</models>
164+
165+
<!--
166+
167+
-->

models/Apartemazements.xml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<sequence values="BWN" symmetry="(xy)">
2+
<prl in="B" out="W"/>
3+
<prl in="***/***/*** ***/*W*/*** ***/***/***" out="***/***/*** ***/*B*/*** ***/***/***"/>
4+
<prl in="B W" out="B N"/>
5+
<wfc values="BYDAWP RFUENC" tileset="Paths">
6+
<rule in="W" out="Empty"/>
7+
<rule in="N" out="Empty|Line|Up|Turn|X"/>
8+
9+
<prl in="B" out="C" comment="draw earth"/>
10+
<prl in="C * *" out="B * *" comment="remove extra earth"/>
11+
<prl in="C C" out="E N" comment="draw grass"/>
12+
<prl in="C" out="N"/>
13+
<prl in="Y" out="C" p="0.25" steps="1"/>
14+
<prl in="Y" out="B"/>
15+
16+
<all comment="draw columns">
17+
<rule in="D B" out="* F"/>
18+
<rule in="F B" out="* F"/>
19+
</all>
20+
<all comment="remove extra columns">
21+
<rule in="FF EE" out="BB EE"/>
22+
<rule in="FF FD EE" out="FF BD EE"/>
23+
<rule in="F B" out="B B"/>
24+
<rule in="B F" out="B B"/>
25+
<rule in="F P" out="B P"/>
26+
<rule in="P* *F" out="** *B"/>
27+
</all>
28+
<all comment="draw corner columns">
29+
<rule in="*A*/ADB/*B* ***/*B*/***" out="***/***/*** ***/*F*/***"/>
30+
<rule in="F B" out="F F"/>
31+
</all>
32+
<all comment="place windows">
33+
<rule in="FBBBF *AAA*" out="*RRR* *****"/>
34+
<rule in="FBBBF *RRR*" out="*RRR* *****"/>
35+
</all>
36+
<prl comment="find h-uneven windows">
37+
<rule in="RFFR RFDA" out="U**U U***"/>
38+
<rule in="RFDA RFFR" out="U*** U**U"/>
39+
</prl>
40+
<all comment="mark h-uneven windows">
41+
<rule in="R U" out="U *"/>
42+
<rule in="U R" out="* U"/>
43+
</all>
44+
<prl in="RFFR/BBBB" out="*RR*/****" comment="merge h-even windows"/>
45+
<prl in="U" out="R" comment="erase markings"/>
46+
<prl comment="find v-uneven windows">
47+
<rule in="RR DA FR" out="UU ** *U"/>
48+
<rule in="FR DA RR" out="*U ** UU"/>
49+
</prl>
50+
<all comment="mark v-uneven windows">
51+
<rule in="RU" out="U*"/>
52+
<rule in="UR" out="*U"/>
53+
</all>
54+
<prl comment="merge v-even windows">
55+
<rule in="RB AB RB" out="RB RB RB"/>
56+
<rule in="RB DB RB" out="RB RB RB"/>
57+
</prl>
58+
<prl comment="forget structure">
59+
<rule in="F" out="A"/>
60+
<rule in="D" out="A"/>
61+
<rule in="P" out="A"/>
62+
<rule in="U" out="R"/>
63+
</prl>
64+
<prl in="AAAAA ARRRA ARRRA ARRRA ARRRA AAAAA" out="AAAAA AAAAA AAAAA AAAAA AAAAA AAAAA"/>
65+
</wfc>
66+
</sequence>
67+
68+
<!--
69+
Some rendered outputs: https://github.com/mxgmn/Blog/blob/master/Apartemazements.md
70+
-->

models/Backtracker.xml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<markov values="BRWU" origin="Center">
2+
<one in="RB" out="WR"/>
3+
<one in="RW" out="UR"/>
4+
</markov>
5+
6+
<!--
7+
Generates connected cave systems with pools.
8+
9+
(-) Can be accelerated by setting forgetPastMatches="True" in both nodes.
10+
-->

models/BacktrackerCycle.xml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<sequence values="BRGWA" origin="Center">
2+
<union symbol="?" values="WA"/>
3+
<markov>
4+
<one in="RBB" out="GGR"/>
5+
<one in="RGG" out="WAR"/>
6+
</markov>
7+
<one in="R" out="W"/>
8+
<one in="WBW" out="WAW" steps="1"/>
9+
<all in="BBB/B?B" out="***/*B*" d="2"/>
10+
<!--<all in="BBB/BBB/BBB BBB/B?B/BBB" out="***/***/*** ***/*B*/***" d="3"/>-->
11+
<all in="A" out="W"/>
12+
</sequence>
13+
14+
<!--
15+
Generates a random cycle.
16+
-->

models/Basic.xml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<one values="BW" in="B" out="W" origin="Center"/>

models/BasicBrickWall.xml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<sequence values="BWO" symmetry="(x)">
2+
<all in="B/*" out="O/*"/>
3+
<all in="O/*/*" out="W/*/*"/>
4+
<markov>
5+
<all in="BW" out="BB"/>
6+
<one in="W/W/W/W/W/W/W/W" out="*/*/*/B/*/*/*/*"/>
7+
</markov>
8+
<one in="OOOOOOOO/BBBBBBBB" out="***B****/********"/>
9+
<markov>
10+
<all in="OW" out="*O" symmetry="(xy)"/>
11+
<all in="OO/OB" out="*B/**"/>
12+
<one in="OOOO/BBBB/OOOO" out="**B*/****/****"/>
13+
<one in="WW/BB/OB" out="*O/**/**"/>
14+
</markov>
15+
</sequence>
16+
17+
<!--
18+
To make BrickWall, add texture and shading.
19+
20+
<sequence values="BWO" symmetry="(x)">
21+
<prl in="B/*" out="O/*"/>
22+
<prl in="O/*/*" out="W/*/*"/>
23+
<markov>
24+
<all in="BW" out="BB"/>
25+
<one in="W/W/W/W/W/W/W/W" out="*/*/*/B/*/*/*/*"/>
26+
</markov>
27+
<one in="OOOOOOOO/BBBBBBBB" out="***B****/********"/>
28+
<markov>
29+
<all in="OW" out="*O" symmetry="(xy)"/>
30+
<all in="OO/OB" out="*B/**"/>
31+
<one in="OOOO/BBBB/OOOO" out="**B*/****/****"/>
32+
<one in="WW/BB/OB" out="*O/**/**"/>
33+
</markov>
34+
</sequence>
35+
-->

models/BasicDijkstraDungeon.xml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<sequence values="BGW">
2+
<one file="BasicDijkstraRoom" legend="BW" steps="1"/>
3+
<all in="W" out="G"/>
4+
<markov>
5+
<all in="GW" out="GG"/>
6+
<path from="W" to="G" on="B" color="G" inertia="True"/>
7+
<one file="BasicDijkstraRoom" legend="BW"/>
8+
</markov>
9+
</sequence>

models/BasicDijkstraFill.xml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<sequence values="BWG">
2+
<all file="BasicDijkstraRoom" legend="BW"/>
3+
<markov>
4+
<all in="GW" out="GG"/>
5+
<path from="G" to="W" on="B" color="G" inertia="True"/>
6+
<one in="W" out="G"/>
7+
</markov>
8+
</sequence>

models/BasicDungeonGrowth.xml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<sequence values="BRACDG" origin="Center">
2+
<union symbol="?" values="BR"/>
3+
<one in="**?**/*BBB*/*BBB?/*BBB*/**R**" out="AARAA/ADDDA/ADDDR/ADDDA/AACAA"/>
4+
<one in="ACA/BBB" out="ARA/BBB"/>
5+
<all>
6+
<rule in="C" out="D"/>
7+
<rule in="R" out="D"/>
8+
</all>
9+
<all in="BD" out="*A"/>
10+
<all in="DDD/ADA/DDD" out="***/D*D/***"/>
11+
<all in="DDD/DAD/DDD" out="***/*D*/***"/>
12+
</sequence>

0 commit comments

Comments
 (0)