Giter VIP home page Giter VIP logo

markovjunior's Issues

Question about MarkovNode nesting and union.

I really love the work in MarkovJunior and I'd like to attempt rewriting it in Rust. My idea is to write fully unoptimized version without inference first and then learning from the process I'd attempt writing full library with optimizations and inference. I am having trouble understanding two concepts though.

Like in REFAL, Markov nodes can be nested: once we go into a child node, we ignore outer nodes until the child branch completes.

Why does nested MarkovNodes are prioritized when entered? I cannot see any advantage of this behaviour other than sometimes making the algorithm a bit more concise.

What exactly is union in terms of markov algorithms? I couldn't find any explaination online that would fit behaviour I see in some examples.

Open up GitHub discussions

First off, very cool project @mxgmn!

I've been messing around with it today and had some questions and wanted to share some models I came up with. Issues aren't really the right format for that - would you be open to turning on the Discussions feature for this repo?

Constraint

Hello. I can't understand ho to add some constraint for WFC. I want to generate river between two points, that points should be declared by me before start of programm.

The type initializer for 'GUI' threw an exception

While building on macos Catalina v 10.15.2
dotnet version : 6.0.300
build command : dotnet run --configuration Release MarkovJunior.csproj
getting the error:

Apartemazements > P = 16
wfc found a good seed 1534281951 on try 0 with 160 observations
Unhandled exception. System.TypeInitializationException: The type initializer for 'GUI' threw an exception.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at GUI..cctor() in MarkovJunior/source/GUI.cs:line 30
   --- End of inner exception stack trace ---
   at GUI.Draw(String name, Branch root, Branch current, Int32[] bitmap, Int32 WIDTH, Int32 HEIGHT, Dictionary`2 palette)
   at Program.Main() in MarkovJunior/source/Program.cs:line 67

Build failed with step as 'How to build' section

I have tried to build with dotnet run --configuration Release MarkovJunior.csproj, but build failed with error message:

C:\Users\user\MarkovJunior\MarkovJunior.csproj : error NU1100: 'net6.0' に対する 'System.Drawing.Common (>= 4.5.1)' を解決できません。

It is Japanese, means "Could not resolve System,Drawing.Common for net 6.0".
Please correct if document is wrong.

linux version

How can i ran this programm on linux?
I tried wine, but its doesnt work(error on screenshot)
Снимок экрана от 2023-01-17 18-06-09

FileNotFoundException when run from other root path

FileNotFoundException when run from other root path, f.ex., from IDE

Unhandled exception. System.IO.FileNotFoundException: Could not find file 'git\MarkovJunior\bin\Debug\resources\palette.xml'.
File name: 'git\MarkovJunior\bin\Debug\resources\palette.xml'
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileModemode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,FileShare share, Int32 bufferSize)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.FinishInitUriString()
   at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
   at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
   at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(String uri)
   at Program.Main() in git\MarkovJunior\source\Program.cs:line 17

Process finished with exit code -532,462,766.

Could a port MarkovJunior to JavaScript?

Hi, I appreciated your work very much. And I am interested in porting it to javascript and canvas which could run on a web browser.
Of course, I would also keep the original repo and license in the port version.

The intro page does not explain how MJ start running when there's no rule matched at the first place

Take the simple Growth model for example, when you start the MJ it's all Bs on the grid so there's no "WB" to start with, so in what mechanism does MJ put a W in center (or via any other way) so that a "WB" can be matched therefore Growth can actually "grow"?

I guess the property "origin=True" might be the trick, but after a rough browsing I somehow can't find the right source (and it seems to me that it could be more "configurable" than just a boolean) to this design and I think this needs some serious explanation at the first section of the intro.

Documentation for xml format

I'd love some documentation about the syntax of the model XML files. At the moment we can only deduce the nodes and parameters from the examples.

map doesn't work with GUI

Using map node with GUI seems to always crash, I'm running the MazeMap model.

MazeMap > Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array.
at GUI.g__drawLine|23_11(Branch branch, <>c__DisplayClass23_0& ) in C:\Download\build\source\GUI.cs:line 288
at GUI.g__drawLine|23_11(Branch branch, <>c__DisplayClass23_0& ) in C:\Download\build\source\GUI.cs:line 290
at GUI.Draw(String name, Branch root, Branch current, Int32[] bitmap, Int32 WIDTH, Int32 HEIGHT, Dictionary`2 palette) in C:\Download\build\source\GUI.cs:line 294
at Program.Main() in C:\Download\build\source\Program.cs:line 70

Symmetry issue (or missunderstanding)

When running this sequence with a size of say, 24x24x5:

<sequence values="WRBUPYA" origin="True">
            <one in="*****/*****/*****/*****/***** *****/*****/*****/*****/***** *****/*****/**R**/*****/*****"
                 out="*****/*****/**R**/*****/***** *****/*****/**R**/*****/***** *****/*****/**R**/*****/*****" symetry="()"/>
</sequence>

I get the "origin" voxel replaced by a 3 voxel bar in any of all the possible directions.
Shouldn't empty symmetry mean a literal match for the rule template?
I only what a vertical 3 voxel pillar.

Customizability of models?

Hey guys,

Amazing tool. I generated several CarmaTowers and I was greatly impressed with the results.

That said, I've read most of the documentation, and yet I'm still not able to wrap my head around the process of creating a custom model with its own rules/constraints/MagicaVoxel pieces. In other words, I'm looking to generate my own CarmaTower-type buildings, but the XML of CarmaTower.xml is a tad cryptic at the moment, especially without any documentation.

I know this was just released, so please tell me if it's too early to attempt such a thing.

Thanks a ton!

Running GUI

Hello,

I can't seem to figure out how to run the GUI. The code seems to be included in the source, but I haven't a clue on how to get it to start.

Document Probability Attribute

Hi,

Thanks for your recent effort in documenting this project. I have an intern tinkering with this (@GraceMagnyFokam) and we're getting some unexpected behavior. For instance

<one p="0.1"> 

does not seem to work. In addition <prl p="0.1" steps="1"> seems to fill the whole screen? I'm sorry I am passing on this information secondhand, but hoping you had some insight.

Thanks!
Dylan

How to run on Linux

I run dotnet run --configuration Release MarkovJunior.csproj but nothing happens, what do display the GUI?

System.Drawing removed on all operating systems except Windows

When trying to run Program.Main on Linux with net6.0 I get an exception.

Unhandled exception. System.TypeInitializationException: The type initializer for 'GUI' threw an exception.
 ---> System.PlatformNotSupportedException: System.Drawing is not supported on this platform.
   at System.Drawing.Bitmap..ctor(String filename)
   at Graphics.LoadBitmap(String filename) in /home/ahouts/Projects/MarkovJunior/source/Graphics.cs:line 12
   at GUI..cctor() in /home/ahouts/Projects/MarkovJunior/source/GUI.cs:line 29
   --- End of inner exception stack trace ---
   at GUI.Draw(String name, Branch root, Branch current, Int32[] bitmap, Int32 WIDTH, Int32 HEIGHT, Dictionary`2 palette)
   at Program.Main() in /home/ahouts/Projects/MarkovJunior/source/Program.cs:line 67

Unfortunately Microsoft has decided to remove System.Drawing on all operating systems except Windows.
https://docs.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only

What to do after building?

I just built the repo (mac ventura) but not sure what the next steps are. Sorry if this is a silly question. Is there an application?

Unhandled System.TypeInitializationException

Cloned the repo to do some playing around on my own and got an exception when I ran the project for the first time with dotnet run --configuration Release MarkovJunior.csproj.

Here's the full output:

$ dotnet run --configuration Release MarkovJunior.csproj
Apartemazements > P = 16
CONTRADICTION on try 0 with 123 observations
CONTRADICTION on try 1 with 139 observations
CONTRADICTION on try 2 with 126 observations
wfc found a good seed 53119890 on try 3 with 141 observations
DONE
wfc found a good seed 34514102 on try 0 with 157 observations
DONE
wfc found a good seed 780037807 on try 0 with 156 observations
DONE
CONTRADICTION on try 0 with 159 observations
CONTRADICTION on try 1 with 111 observations
wfc found a good seed 1719455730 on try 2 with 168 observations
DONE
Apartemazements > P = 16
wfc found a good seed 1290867910 on try 0 with 156 observations
Unhandled exception. System.TypeInitializationException: The type initializer for 'GUI' threw an exception.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at GUI..cctor() in /Users/sammokracek/Desktop/MarkovJunior/source/GUI.cs:line 30
   --- End of inner exception stack trace ---
   at GUI.Draw(String name, Branch root, Branch current, Int32[] bitmap, Int32 WIDTH, Int32 HEIGHT, Dictionary`2 palette)
   at Program.Main() in /Users/sammokracek/Desktop/MarkovJunior/source/Program.cs:line 67

Seems like this is some sort of issue with the GUI not initializing correctly. Not too knowlegable in .NET, C#, or this project so if there's something simple I'm missing I apologize.

System info:
MacBook Air 2018 (Intel)
MacOs 12.3.1
Fresh .NET 6.0.3 install

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.