Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent sensor mask when nebula moves #57

Open
vkrajnak opened this issue Jan 27, 2025 · 4 comments · May be fixed by #58
Open

Inconsistent sensor mask when nebula moves #57

vkrajnak opened this issue Jan 27, 2025 · 4 comments · May be fixed by #58

Comments

@vkrajnak
Copy link

vkrajnak commented Jan 27, 2025

Sensor mask is inconsistent when nebula moves making some nebula tiles visible and some empty tiles invisible. See screenshot below, game seed 1029303108. If sensor mask and tile type were calculated in reverse order, sensor mask would make sense.

state = self.compute_sensor_masks(state, params)
# Shift objects around in space
# Move the nebula tiles in state.map_features.tile_types up by 1 and to the right by 1
# this is also symmetric nebula tile movement
new_tile_types_map = jnp.roll(
state.map_features.tile_type,
shift=(
1 * jnp.sign(params.nebula_tile_drift_speed),
-1 * jnp.sign(params.nebula_tile_drift_speed),
),
axis=(0, 1),
)
new_tile_types_map = jnp.where(
(state.steps - 1) * abs(params.nebula_tile_drift_speed) % 1 > state.steps * abs(params.nebula_tile_drift_speed) % 1,
new_tile_types_map,
state.map_features.tile_type,
)

Image

@vkrajnak vkrajnak linked a pull request Jan 27, 2025 that will close this issue
@CJBoey
Copy link
Contributor

CJBoey commented Jan 28, 2025

Addressed in issue #45

@vkrajnak
Copy link
Author

vkrajnak commented Jan 28, 2025

While I do not dispute the fact that the order is consistent with the match resolution order, it is inconsistent with the way nebula reduces vision and empty tiles do not reduce vision. Nebula tiles may currently be temporarily visible and empty tiles temporarily invisible. The game rules mention no exception for vision reduction, hence the rules or the code should change.

@vkrajnak vkrajnak changed the title Sensor mask and tile type are calculated in the wrong order Inconsistent sensor mask when nebula moves Jan 29, 2025
@StoneT2000
Copy link
Member

Thanks for pointing it out @vkrajnak. I think changing the functionality now will cause issues for existing bots and we already made one big balance patch. I think for now it is better to update the rules on this caveat.

@vkrajnak
Copy link
Author

The decision is up to you, just bear in mind that either way some bots will issues - those relying on the bug may break if the code changes, those relying on what's written in the rules if the rules change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants