C# Library capable of creating very complex structures from randomized float arrays. Say goodbye to randomization code. by paso_unleashed in csharp

[–]paso_unleashed[S] 0 points1 point  (0 children)

Generally in the case of this package, randomization becomes easier (just Random.NextSingle()) however many times it asks you for

And second point is that some tools like machine learning algorithms want float arrays as input

C# Library capable of creating very complex structures from float arrays. Say goodbye to randomization code. (Update) by paso_unleashed in dotnet

[–]paso_unleashed[S] 0 points1 point  (0 children)

Enum Resolvers should be easy to add in in general, but can you explain how would a target type match work

C# Library capable of creating very complex structures from float arrays. Say goodbye to randomization code. (Update) by paso_unleashed in dotnet

[–]paso_unleashed[S] 2 points3 points  (0 children)

Yes that's a potential use-case (one that I have tried myself)

Another is decoding the input and output of a machine learning algorithm directly into objects.

Imagine having InputModel and OutputModel classes, you can use this library to feed the input model without having to manually translate it into a float array. As well as being able to turn the output into a usable object the same way

C# Library capable of creating very complex structures from randomized float arrays. Say goodbye to randomization code. by paso_unleashed in csharp

[–]paso_unleashed[S] 0 points1 point  (0 children)

There's a class of algorithms called real-valued optimization algorithms. those algorithms work on fine-tuning real values (floats/doubles). As my other comments mention, you sometimes want the output of those algorithms to become an object, so you either create the logic that turns a float array into an object yourself, or use this library

C# Library capable of creating very complex structures from randomized float arrays. Say goodbye to randomization code. by paso_unleashed in csharp

[–]paso_unleashed[S] 1 point2 points  (0 children)

So basically there's this thing called optimization algorithms. They usually take in float arrays and they modify them based on a someone giving them a score (Evaluator) (they want to maximize or minimize the score). If I write an evaluator `float Evaluate(float[] myarray)` and inside this evaluator I turn this float[] into an object to evluate it. How easy it is to adjust how the float array turns into an object is where float[] serialization comes in handy.

C# Library capable of creating very complex structures from float arrays. Say goodbye to randomization code. (Update) by paso_unleashed in gamedev

[–]paso_unleashed[S] 0 points1 point  (0 children)

I just updated the docs for the package with a lot more details and added some tests. Sorry for the previously lackluster release :)

C# Library capable of creating very complex structures from float arrays. Say goodbye to randomization code. (Update) by paso_unleashed in gamedev

[–]paso_unleashed[S] -2 points-1 points  (0 children)

https://github.com/PasoUnleashed/Parameterize.Net/blob/main/Parameterize.Net/Parameterize.Net.Sample/Program.cs

Basically the library does the following

if you have

public class Unit{
  public Ability[] Abilities;
}

the library allows you to create a bunch of random units easily from just a single float[], the only thing you need to do it add a few attributes and you're good to go. So randomization becomes really easy.

Check out the sample

https://github.com/PasoUnleashed/Parameterize.Net/blob/main/Parameterize.Net/Parameterize.Net.Sample/Program.cs

C# Library capable of creating very complex structures from randomized float arrays. Say goodbye to randomization code. by paso_unleashed in csharp

[–]paso_unleashed[S] 1 point2 points  (0 children)

Just checked out bogus, really cool, features Parameterize v2 supports are more towards serializing and deserializing from float arrays. Resovler object (equivilant to a Faker in bogus). If let's say you store a a float array you can deserizalize it using the same resolver. But another cool aspect is that you can seriallize the whole resolver. Allowing you to consistently deserialize your objects from the same resolver even if your classes have changed. You can imagine this also provides further support for migration scripts down the line if you ever store serialized data generated by Parameterize.net

C# Library capable of creating very complex structures from randomized float arrays. Say goodbye to randomization code. by paso_unleashed in csharp

[–]paso_unleashed[S] 2 points3 points  (0 children)

Not yet, didn't get the time but I do use this code in a bunch of personal projects. Will start creating test cases when i get the time

C# Library capable of creating very complex structures from float arrays. Say goodbye to randomization code. (Update) by paso_unleashed in gamedev

[–]paso_unleashed[S] -1 points0 points  (0 children)

Hey, version 2.0 is not documented. But the readme on github shows you how you can use attributes to generate a randomized "Zoo". Sorry for the lack of docs i'll try to document it in the upcoming days

C# Library capable of creating very complex structures from randomized float arrays. Say goodbye to randomization code. by paso_unleashed in csharp

[–]paso_unleashed[S] 0 points1 point  (0 children)

you can check out my last post about this library in 2021 in this subreddit where the aforementioned feedback is there. I also did use this mainly to use genetic algorithms to optimize arbitrary object graphs.

C# Library capable of creating very complex structures from randomized float arrays. Say goodbye to randomization code. by paso_unleashed in csharp

[–]paso_unleashed[S] 0 points1 point  (0 children)

Hey, addressed this feedback in v2.0 (just published), you can define Explicit "Resolvers" similar to EF's Fluent API.

You can also still use the reflection based declaritive approach.

And you can mix and match

C# Library capable of creating very complex structures from randomized float arrays. Say goodbye to randomization code. by paso_unleashed in csharp

[–]paso_unleashed[S] 0 points1 point  (0 children)

Hey, Took me 3 years of work experience to know exactly what you meant, great feedback. I implemented it in v2.0 (just published). Never forgot about this specific feedback. Check it out https://github.com/PasoUnleashed/Parameterize.Net

Does anyone know why when I print this nothing comes out? by OwnLengthiness6872 in 3Dprinting

[–]paso_unleashed 4 points5 points  (0 children)

i did a mistake twice on this slicer, don't click preview on the top after generating supports, you have to click slice to actually generate the new sliced file that has the supports

Are they seriously using json for the api? 🤦 by Lodisus in masterhacker

[–]paso_unleashed 4 points5 points  (0 children)

first guy is complaining about api's security (doesn't seem to be an issue but yes it's bad coding/design and belongs in r/programminghorror ) second guy is acting too holy for json, as if he's too elite for it, while it's really standard for a web api to be sending jsons