schrum2 / EvoCraft-SCOPE

0 stars 0 forks source link

Different Potential Block Sets #29

Closed schrum2 closed 2 years ago

schrum2 commented 2 years ago

Some of the blocks are just not ever useful to place. When they are placed in the world they just become item drops that fill up the world and slow down the execution. Make a command line parameter POTENTIAL_BLOCK_SET that can only take on one of a range of specific string values (see https://realpython.com/command-line-interfaces-python-argparse/#setting-a-domain-of-allowed-values-for-a-specific-argument)

One option is "all" which is what we currently have. Any block can be chosen.

Another option is "undroppable" (unless you can think of a better name). This excludes all of the block types that just end up falling to the ground when placed.

We can also add other types. I think a good one might be "machine", which consists of only the blocks that we know are necessary to make that flying machine example from the initial Evocraft example code.

We might also want to have another set that contains a variety of redstone components to see if we can specifically evolve things that try to "function" in some way.

schrum2 commented 2 years ago

Put info about this in block_sets.py

schrum2 commented 2 years ago

I cleaned up the code a bit and I think it works. Comment, test, and then close if you agree.

Also, this is probably just my own ignorance, but why is WATER in the machine set?

MuellMark commented 2 years ago

I added the command line parameter, which now gives users the ability to choose from all blocks (which is also the default), undroppable blocks, and blocks that are needed for a flying machine. Obviously, more can be added in the future very easily, the only things you'd need to add are the name for it in the main file, and a corresponding list in block_sets 2022-05-24_09 23 58

schrum2 commented 2 years ago

Please make the list of undroppable types be defined with the names of the blocks rather than the numbers

MuellMark commented 2 years ago

I printed all of the block types and then removed the quotation marks to just get the constant names. From there I deleted all the blocks that just cause block drops, more so than the original list.