Runix-Minecraft / Azathoth

A blind library
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Add pattern recognition #3

Open 0xilly opened 9 years ago

0xilly commented 9 years ago

Move Runix's pattern recognition to The library

0xilly commented 9 years ago

Might have to write my own way of doing this without using Runix's. Runix's energy system is to ingrande to the pattern congregation.

josiahseaman commented 9 years ago

The only cross over between pattern recognition and the energy listing that I know of is getMostValuableBlock(). This method isn't used anywhere and should just be deleted. Give it a try. I think these can definitely be separated.

0xilly commented 9 years ago

First thing: Your alive?

Second: I'll look into it again IIRC I couldn't get it to work without moving tiers/energy into library which is not going to happen the library has no need to for that information.

On Dec 4, 2014, at 21:52, Josiah Seaman notifications@github.com wrote:

The only cross over between pattern recognition and the energy listing that I know of is getMostValuableBlock(). This method isn't used anywhere and should just be deleted. Give it a try. I think these can definitely be separated.

— Reply to this email directly or view it on GitHub.

josiahseaman commented 9 years ago

Yep, I'm alive :-) I've just been focusing on work more. I've been playing GoD Factory and Star Conflict for fun. But both of those are getting old. So I'll be circling back around to minecraft again. Runix is a long term commitment for me, so I'll always come back around to it.

We had a conversation about the energy link to pattern recognition a while ago. There's just the one unused dependency. They can be separated very easily. What cannot be separated (nor should you want to) is that both use a unified HashMap<WorldXYZ, Block> input and output interface. I settled on this interface data structure because it was constant time to check membership, which happens frequently, and I can iterate over the set of pairs without complicated loop structures. There are a couple places that deviate slightly from the interface, but overall I'm still happy with that decision.

0xilly commented 9 years ago

For the sake of speed of getting this done as 1 to 1 as possible but I do want to do some thing along the lines of PatternRegistry.registerPattern(modid, new fooPattern); later for sorting purposes

josiahseaman commented 9 years ago

Using Block classes to represent target patterns actually got a lot better in 1.7 because now you can make made-up placeholder instances of RunixFakeBlock (sp?) when you're trying to match against some complex criteria. Sure, the system could be expanded on, but start with the basics, ensure that Runix can still run against the library. That will give us a structurally solid place to build off of. Libraries that are built from proven code that was made to solve a real problem are always better than libraries made to solve theoretical problems.

0xilly commented 9 years ago

By sorting I meant Logging(in retrospect that would have been better) I want to log what mod is registering which pattern in the pattern registry. The sorting of patterns in the registry will be in a first come first serve basis totally dependent on when FML loads the mod.

0xilly commented 9 years ago

Ok looks like I'm able to execute a pattern but I'm able to execute by just clicking anywhere in the world. goddanmit

josiahseaman commented 9 years ago

Clicking anywhere anywhere? It's not pattern recognition unless it returns negative on non-matching areas.

I like your status message :D

0xilly commented 9 years ago

Right now I'm glad that it's executing what's inside a pattern now that it does that I can try figure out where (I)it got fucked up :D

On Dec 15, 2014, at 11:33, Josiah Seaman notifications@github.com wrote:

Clicking anywhere anywhere? It's not pattern recognition unless it returns negative on non-matching areas.

— Reply to this email directly or view it on GitHub.