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

Improve piece selection by adding a loopup on which piece would leave most blank squares open #61

Closed
joshiraez opened this issue May 12, 2021 · 2 comments

Comments

@joshiraez
Copy link

joshiraez commented May 12, 2021

Right now, is quite easy to get into loops once you set up a specific pattern in the lowest row of the board. Loops with Os and Is are easy to fill plus leave a lot lf playroom to get set up other patterns. This makes getting tons of lines """"""""""""""""trivial"""""""""""""""""" and could risk an algorithm existing that maintains the tower in place. At the very least, I think we can do better to ensure the first line is much harder to get, or outright impossible

My idea would be to have a sort of look up to see which piece would leave more "blank squares" up. As to avoid lines AND filling the board easily.

This is not easy to do at all, but I think it'd be interesting to try. What are your opinions? I'd love to work in this too.

Think that is a sufficient condition to leave one square blank in a line for a line to not ever be possible in that place. I think it could be very interesting to play with that a little

@joshiraez joshiraez changed the title Randomize (or calculate steps forward) the piece given so to avoid loops Improve piece selection by adding a loopup on which piece would leave most blank squares open May 12, 2021
@qntm
Copy link
Owner

qntm commented May 18, 2021

So, my feeling is that I'm interested in exploring new possible AIs for HATETRIS but I'm a little wary of officially adopting any particular algorithm as the official "HATETRIS II" algorithm, at least right now. Separately, I also noticed someone made "LOVETRIS" which is just HATETRIS with a sign flipped, and, like, sure, I can do that.

So anyway, what I'm currently doing is reworking some of HATETRIS' internals so that it becomes possible for the player to select from several possible AIs before the game starts. After that, I hope it will become possible to create an option where players can literally just paste a chunk of JavaScript and play against a custom AI of their own devising. (Yes, this would involve eval, but the player would be basically attacking themself, so...) At that point, the door will be open for you or anybody to start experimenting.

@qntm
Copy link
Owner

qntm commented May 21, 2021

Following #66, and as described in the README, it's now possible for anybody to develop and share custom AI code which would work with the existing HATETRIS game. I hope that's a good enough launching point for new development? I look forward to seeing what, if anything, people come up with.

@qntm qntm self-assigned this Jun 18, 2022
@qntm qntm closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants