schrum2 / EvoCraft-SCOPE

0 stars 0 forks source link

type_target fitness #38

Closed schrum2 closed 2 years ago

schrum2 commented 2 years ago

Make another fitness function that wants to generate a shape with a specific number of occurrences of a particular block type. Call it:

type_target(client, position_information, corner, args)

There will need to be a new command line parameter in args called DESIRED_BLOCK_COUNT that specifies the desired count.

The actual fitness calculation will be the DESIRED_BLOCK_COUNT minus the absolute value of the difference between the DESIRED_BLOCK_COUNT and the actual count (call type_count to get this so you can reuse code)

alejmedinajr commented 2 years ago

The type_targetfitness function has been created.