metal-pony / bucket

haz bucket
0 stars 0 forks source link

BunchOfGames plays with only a single shape #75

Closed metal-pony closed 1 year ago

metal-pony commented 1 year ago

This runner is only playing the game using a single shape, as seen below. This could be an issue with ShapeQueue or the method of populating them. Also look into why there is a blank panel in the second row and either fix it if trivial or create another issue.

image
metal-pony commented 1 year ago

~Fixed by sparklicorn/tetris-ai#3~

~This was resolved inadvertently during the last stretches of refactoring.~

edit: Re-opening. It appeared to have been fixed, but that is incorrect. The issue was seen in other drivers as well (GenericRankerEvolver). The defect occurs when using ShapeQueue concurrently. Recent changes to BunchOfGames made it so the games ran effectively in sequence, so the defect was obscured.

metal-pony commented 1 year ago

The issue seems to be that ShapeQueue#SHAPES is static, and instances are trying to shuffle it concurrently when generating next elements. The immediate fix is to revert SHAPES to an instance member.

Manual testing results:

BunchOfGames driver: (reverted execution back to multi-threaded) image
GenericRankerEvolver driver: image