Alternative implementation for seed search (#120)#186
Conversation
|
What is the use case that makes this strategy for json structure and code
architecture worth the re-implementation? (Of both the features already
tested and are part of my other PR and the lengthy list of ones that I have
drafted but not committed as part of other testing I'm doing)
I ask as I don't see the benefits and see some notable downsides to certain
redundancies in the json and notably increased testing challenges. As such,
I would like to better understand your perspective.
By arbitrary region do you mean areas not centered around 0,0 and of non
512 divisible lengths?
|
|
Ok, so I'll start by explaining briefly how it works.
I wanted also to address a limitation of mgod's implementation : the biome data is computed all at once, which can cause memory issues when searching a large area. To resolve this, I've broken up the search area in fragment-sized chunks, and all Constraints are tested on each chunk in one pass. This method enables us to use areas of arbitrary size (non divisible by 512) and positions (not centered on (0,0)), as they will be broken up into fragments before checking. In the end, I think this implementation is more flexible, and should have somewhat better performances characteristics.
I don't understand very well what you mean by "certain redundancies in the json", could you clarify ? |
|
First of all, again, I appreciate the interest in #120 and your effort in helping to implement it. I did not yet look into it, but I agree with @jmessenger235: Why do you reimplement a feature that is already implemented and in the process of being integrated into the mainline? You claim that your implementation might be quicker, but at the same time you are not sure about it. The appropriate course of action would have been to describe your findings (like possible problems) in #120 and to wait for my changes that help to better integrate the current implementation into the existing Amidst code base. After these are done, it is the right time to discuss the concrete query syntax and possible optimizations for the search algorithm. Providing a complete alternative implementation of the feature certainly does not speed up the process. This is not a competition about who can provide the best implementation. Please let's collaborate on finding and solving the issues, so we end up with a single good implementation. Writing code is the easiest part of software development. Identifying the requirements and solving the issues is hard. While your implementation might fulfil certain requirements and solve several issues, it is hard to spot these in the implementation. Also, it is easier to discuss and agree on changes than it is to cleanly merge different implementations. Thus, let's have a high-level discussion about the changes in #120, before we implement any changes in code. Thanks. |
|
@stefandollase I agree, lets get your changes in and in the mean time have some further discussion about what is needed. @moulins let's move this discussion to #120 per the request. I will add my comments there. |
Remove all filter machinery (amidst.mojangapi.world.filter.*)
|
It would also be useful if we could add a file selection windows to the search window so we aren't limited to having to constantly edit search.json when you are messing around with completely different searches. |
A missing required field or an unknown field will cause an exception
Not all functionalities are present
(the variant of a biome is its "M" version)
|
I'm closing this PR: I'm still interested by writing a seed search implementation for amidst, but the code in this branch is being heavily refactored/modified to take into account all the discussions we've had and the WIP specification, and doesn't work anymore. I will reopen another PR when I have a working prototype for the new semantics. |
This is an alternative implementation for the seed search fonctionality.
I have implemented (roughly) the features I proposed in this comment.
I have taken a completely different approach than @jmessenger235 and @mgod, so I had to scrap almost all of their code, but I think it's worth it.
As a result, it doesn't have (yet) all the features of jmessenger235's last pull request (#169).
It should also be a little faster, but, I didn't do any benchmarks, so maybe I'm completely wrong (it did seem faster on the few tests I made).
Todo list (in rough order of priority) :