42 ms·
Show HN: Lovetris – Tetris which always gives you the best piece
- GistNoesis 5y agoAfter playing Hatetris https://news.ycombinator.com/item?id=27063894 https://news.ycombinator.com/item?id=27063894 yesterday on HN, I decided I would rather have the AI on my side so I forked the site and flipped a sign. If your life feels like Hatetris, Lovetris will bring you comfort. Enjoy :)
- carl_dr 5y agoIf all you’ve done is flip a sign, it’s a little disingenuous to say “by GistNoesis“.
- indigochill 5y agoThis version didn't exist until GistNoesis flipped the sign, so no, it's not. This gets to a larger philosophy of open source: we should encourage people to fork when they want to iterate on someone else's work, however minor that iteration may be. This is open source working as intended.
- learnstats2 5y agoThe Hatetris code doesn’t appear to have an open source license, or any license, so it isn’t open source. This use of the code is a clear legal breach of copyright, in the absence of specific agreement with the copyright holder. (On the Hatetris page, the author declines someone’s request to use the code elsewhere)
- Pfhreak 5y agoI mean, Hatetris probably wasn't using the Tetris trademarks properly, right? Aren't both just remix culture?
- simondotau 5y agoMorally? I suppose if you squint hard enough. Legally though, just because one person's proprietary work relies upon another person's proprietary work, doesn't mean it suddenly becomes open source or public domain.
- Pfhreak 5y agoI'm just surprised the community made the critique on this version but not the other one.
- simondotau 5y agoHonestly I’m not surprised. The prior work could be argued as being fair use of the Tetris copyright. It certainly isn’t stealing any market from any official licensed Tetris products or services. Morally, I can find it very easily defensible. This “Lovetris” work is a blatant copying and republishing of someone else’s proprietary work effort with no permission. Morally, I don’t see this as an egregious abuse, but I can see why this community would object to someone not acting in the spirit of open source licensing.
- Jon_Lowtek 5y agohttps://github.com/qntm/hatetris/issues/50 https://github.com/qntm/hatetris/issues/50 License: MIT
- learnstats2 5y agoI'm not sure I deserve to be so downvoted for this, considering this clarification came after my comment ;(
- deleted 5y ago[deleted]
- haneefmubarak 5y agoI didn't downvote you, but I want to clarify what's going on because I know it sucks to get down voted with explanation. The reason you're getting so many down votes is because you made strong claims in a harsh tone that turned out to be false in a trivially verifiable manner. The intent there is that you should've verified your claim through and through before attributing a misdeed to someone who simply sought to share something they thought was cool to make with others.
- learnstats2 5y agoI find it important to identify that yes, a license is required to use someone else’s code - I mean this legally, not morally: you can be sued. The sibling points about trademark law (which is different) and remix culture (which has some legal protection but not that I’m aware for lines of code) seem to miss this point. This is a licensed use, it turns out, which is great. If the author here had not identified that before publishing, then they were putting themselves at legal risk. [on a technicality, the MIT license hasn’t been properly invoked, since the MIT license requires the text of the license to be included in full, but the original author’s consent for use seems now to be clear]
- Grustaf 5y agoIf you take something that took hours to build and (as is claimed) spend 1 minute modifying it, you absolutely have no right to claim it’s “by” you. I think everyone except you agrees on that.
- tobr 5y ago> I think everyone except you agrees on that As a member of “everyone”, would you please not put words in my mouth.
- franciscop 5y agoWell they also changed the name, so this new concept of Lovetris is by the new author, even if the code to make it possible is not. Lots of references to the old work as well, similar distribution (e.g. not paid), etc. If I was the author of Hatetris I'd be happy for this version!
- Grustaf 5y ago> they also changed the name Is that a serious argument? If you write a techno song, and I take it, turn up the BPM and publish it as “by me”, would it help my case that I also changed the name of the song?
- yeahboats 5y agoIn a way, I got just as frustrated (well maybe not _as_ frustrated) as playing hatetris, because I couldn't easily make 4 line combos. That is, until I managed to set up endless straight pieces and stack the rest of the board save that one slot.
- electroly 5y agoVery nice! My initial reaction is: it's not giving me the piece I want. It's trying to force you to clear individual lines as soon as it is possible to do so. But in real Tetris, you want to clear four lines at a time to get double score, which may mean withholding a line clear when you could have done one. Consider this replay: హටເח௨ඞܗТۑටܢݹ௫੬ຽߢ௧ලບঅযلЈǶ It ends by giving me nothing but S pieces, because it wants me to take the single line clear. It won't stop giving S pieces until I do so. In actuality, any other piece would be preferable; there are available spots for all of them, and I can build up to a Tetris. But with the S piece, my only options are to sacrifice the Tetris for the single line clear, or create a hole in my stack.
- andai 5y agoTetris(Noun) The act of clearing four lines at once (the maximum possible) in Tetris. Somehow went my entire life not knowing that meaning of the word!
- input_sh 5y agoIt depends on the implementation of course, but clearing 4 lines at once usually brings a huge amount of points. For example, NES version at the first "level" (slowest speed): 1 line = 40, 2 lines = 100, 3 lines = 300, 4 lines = 1200. It also increases the speed every 10 lines, so you want to plan accordingly for maximum score. You can get above that first level with either 400 points or 3600. If you have some time to kill, highly recommend this and the follow up video: https://www.youtube.com/watch?v=9RaqVGzhQTM https://www.youtube.com/watch?v=9RaqVGzhQTM
- stormbrew 5y agoIn modern ("guideline") tetris T-spins multiline clears tend to actually be the most point-garnering moves. It's a bit weird that the game named tetris went that way but oh well.
- tome 5y ago"Tetris" as in "tetrahedron". mind.equals(blown).
- djmips 5y agoI think to make this a fun-ish experience would be to have the screen start filled with mostly garbage and holes and then have the the 'AI' lovingly send you the appropriate pieces to clean up the mess... I tried this by purposely messing the board and then going ahead with the game and I found it quite pleasant. Another idea would be to have it 'normal' until you got in trouble and then it would lovetris you back to health.
- IshKebab 5y agoI don't think you need AI to decide the best piece. Or any logic at all. It's just always the long piece. Pretty boring. Might be more interesting if there were other constraints like it couldn't give you the same piece too often or something.
- raldi 5y agoI got two long pieces, laid them down side by side, and was hoping for another one so I could start getting set up for a tetris, but all I got was garbage Z pieces forevermore, which were the absolute worst piece for me to get. Started a new game. Put the long piece vertically against a side wall. Got an S piece. Whhhhyyyyyyyyyyy?
- themodelplumber 5y agoWhat .... That is exactly what happened to my wife when I sent her the link just now. "Here honey, this ought to be relaxing" and boom, two long pieces and then a Z piece army. I appreciate a free game but is this one of those abusive research projects? Edit: Undo and redo don't work here either
- GistNoesis 5y agoI'm sorry for your bad experience. "Undo and redo" shortcut don't seem to work, but the clickable undo and redo button at the top left work. It's a quick project which arose from curiosity : "what would happen if the hateful AI tried to do the opposite". This AI does its best to always provide you some outs to the limit of its abilities. You have plenty of freedom to guide the game into interesting landscape while having an AI that always offer you safe ways to recover. But you still have to play your part, the AI can only handle half the job. Lovetris has some interesting complexities, and touch the subject of collaborative AI whereas Hatetris is an adversarial AI. Collaborative AI and AI alignment are interestingly hard research subjects which have philosophical and technological components. With subject as deep as love and working jointly, it's hard to satisfy everybody. Lovetris with its "exhaustive short horizon exploring strategy with simple terminal heuristics" isn't capable of perceiving long-term intent farther than its tree searching depth. And reciprocally, if you set the horizon too far, the human player is bad at reading the intent of the AI, and doesn't do what the AI suggest. There are probably better strategies, like monte-carlo tree search with some neural networks which could better solve the intent communication problem between the human and the AI, and provide a better experience, but they take a little more work than just flipping a sign. Add a little feedback via data collection and such an AI can probably send its player into an hedonistic loop.
- fatlasp 5y agoas someone who has an ocd need to get the 4 line tetris clear this triggers me
- linux_is_nice 5y agoPlease do not trivialize having OCD like that- In reality, it's a debilitating disorder characterized by severe compulsions.
- deleted 5y ago[deleted]
- aroman 5y agoI am confused why someone would downvote this comment, but you are completely correct, and thank you for pointing it out.
- TazeTSchnitzel 5y agoOr use the word “trigger” to mean mere annoyance. It is tragic that people with a hatred of people living with conditions like PTSD and epilepsy have turned that word into a joke. (I guess most people who use that word now are unaware of this history.) I know people who experience actual triggers and it's a very painful thing.
- batch12 5y agoI am falling behind. Can someone send me the most current, approved vobaulary lists, please?
- deleted 5y ago[deleted]
- seattle_spring 5y ago> Or use the word “trigger” to mean mere annoyance To be clear, the people that took away meaning from this word were the people that added "trigger warnings" to the most trivial of things. "trigger warning: meat eating." "trigger warning: bad words." > It is tragic that people with a hatred of people living with conditions like PTSD and epilepsy have turned that word into a joke That's really not what's happening.
- linux2647 5y agoReminds me of https://xkcd.com/888/ https://xkcd.com/888/
- quickthrower2 5y agoEh? Seems the same as hatetris, an endless stream of s shapes!
- graderjs 5y agoI love this, this is awesome. If only life was like this. I guess it is sometimes, when you're in the golden flow of everything going good...How to keep that? Maybe just keep grabbing fortune by the forelock 'cause she's bald behind.
- iratewizard 5y agoI'm excited for someone to make randomtris - tetris which always gives you a random piece.
- function_seven 5y agoI'm holding out for annoytris. You get random pieces until the AI detects you're being greedy. If it thinks you're trying to setup a 4-line Tetris, then that's when it starts with the bad pieces. Best strategy is to clear 1, 2, or even maybe 3 lines at a time. (But don't get in the 3-line habit, you might anger the AI still)
- leovander 5y agoFor those wanting to clear tetris's. Trick is leaving that square empty if you try to keep clearing the lines. And if you clear the screen, you can see I saved myself twice using the same starting move with that Z others were complaining about. Ζටໃܢ௨ඖȤཧ௪Ϻതझ௨චʑݹɷටÐݹಏටෆࢭ௧ڈໃŧ௨൞ໃӃ௨ƣໃڍਚඨƙђ௨ఢƙɕஓقາђ௨ചໃυۑටҏಠ௨శժݹࠒуໃZ௨बໃܘݤঋТວ௧ϽІܥ౫ටլݹષsເђரටใחਚඨʃݶԪටПݷ౫චƸݹߤඖܘͻݫళɑŧԤƣවݺԥಅවݟవටฮࡉ௨ഖVݶɷඖʛݸԫقիஈԪقНݸ౦قࡍݥݬϺȤஅԪضȣקਚඝܘͷਚ൲UɝϢටࠄݹ௧uಸݹଢටಊݹಏටෆࡥԥඪܘݚԥචȠɕ୦уෆऄࢶقȤஅԪقȤॾiʝȣݚԥvІקਛටฎJ௧ƣຯђఅටӿݎߜ൶ຜݞߜథลɛతටවࡁ௨ಘƙɕ௩ʝÐݷԫقໃѢ௭ටฅຍஜҔСݷԪකНݺد෮ໃѠ௨ڄฮࡨ௨ڠຈݟ௨ചໃͷ௧ƣຜݸđقÐܢஸඥܒࡉ௨ඝЛݹଛɦଈݶɝقVݹளڄໃѢ௨ฃໃɢԥගІپ௨౾ܘܡభ൝ඨҲϢඡНऄஐڄຯ൫ࡋඐ๒ݕகණවߢ௨wະࠇஐڠWɔҋගƬݶమwฅݸసටຯɝѻටWڝ௨౾నݹਓeІݹ௧Σଈܦ౫ටȤঅ௨ඡܘܢ௨ช൧ܥಈಀଈɠஐڌະࢭࢴقଭݪԥڠࡍݟ௧इවݶɷƣКݹ௨uഉݸƔঌໃܢߛΟໃi௨ೲໃԔҫටనऔௐ෮ໃŧԥඖܘݟ௨ಛໃZௐڌຯঔஓڈະऄࢴටПܭԥ൝Єঅઽചໂђߛsවݶɶƣܧɕ௨ටฎࡑ௨ఢƚݹஐټໃҲтටࠄڢ௨ඨІݹಳೲໃঅઽගЄॾಥ3
- diiaann 5y agoBetter than hatetris, but I'd much rather the TGM randomizer.
- MrYellowP 5y agoI've played HateTris for once and now this. Considering that this is basically game-review, I can cut this short to: Both are really boring.
- karma_fountain 5y agoI think you should add a link to and acknowledge the original on the actual game site. It's not really enough to link to your own github then have the link there.
- nick2k3 5y agoIt would be great if there was an in-between version with a timer (or countdown) that alternates between Lovetris and Hateris. Still a bit far from the randomness of the real Tetris but would enable quite some strategies..
- johnchristopher 5y agoI think it could have a place in an anxiety program or something. A video game as a safe place with the dopamine hits of Tetris. edit: a very safe place indeed, I played for 5 minutes and the excitement is kinda low once you figure out how to trick the AI to give you what you want :D.
- croddin 5y agoI was thinking about trying to make a version that optimized for giving you four lines at once to be a real lovetris but then decided that would probably just almost always give the straight pieces so it wouldn’t be too interesting.
- sethammons 5y agoMy exact first thought: gives you the best piece every time? Easy, always give the I block.
- hyperpallium2 5y agoAffectionatetris?
- madsbuch 5y agoApparently the game can out you in a corner where you can not win: ࠁටໃݶԣலໃݹࠅॴໃݛԥ੯ටஈ௨ඥ೦ݹ௨ඥಸݹ௨ටമ๐௨ൽഉݹݹقາڭ௨ටഫݑСටໃԓ௦૫ໃݹ௨ටໃݹ௨ටໃxħقໃƬݴΟໃKЭइໃC౻ටຯٲಏقแڽ௨ఢƔݹரٯໃԔޛඥДݹߚฃໂɛԥడM൵௨బໞݹҬɦషݸßࡇHܤЪsເלԚؿИݷƶ
- raldi 5y agoYou can win: ࠁටໃݶԣலໃݹࠅॴໃݛԥ੯ටஈ௨ඥ೦ݹ௨ඥಸݹ௨ටമ๐௨ൽഉݹݹقາڭ௨ටഫݑСටໃԓ௦૫ໃݹ௨ටໃݹ௨ටໃxħقໃƬݴΟໃKЭइໃC౻ටຯٲಏقแڽ௨ఢƔݹரٯໃԔޛඥДݹߚฃໂɛԥడM൵௨బໞݹҬɦషݸßࡇHܤЪsເלԚؿИݟಳउܔऎ௧ڏܐওடปիୱଛआҟڭߞشຯݶޚปÐϳਫಗ๐ݡல၁ଈݶతಧາঐ௨ಬȣܤ௨s൧ݞసටफऄஜΟරߟԥನȣݐ௨ಀഫݮ௨ॴວݹসඨʅݹࠉටիঅடٯෆݶѻඦݡŦ௧੯ଈݠߜටஃݹذටƾݹதsໂঔ௨ඖໃݸذsະङ௨ೲໃݹ௨ටແ
- Lapsa 5y agoL minos should be rotated automatically. Very hateful.
- frodetb 5y agoI play a lot of NES tetris, so this actually threw my instincts for a loop. What I think is most satisfying is when I pull off a "tetris", i.e. get 4 lines at a time with a long-bar. This implementation seems greedier, as it seems to want to give you the pieces necessary to complete any line at all. I worked around it until I got a well on the right hand side, at which point all I got was long-bars. This is the cleanest path I could find to an infinite run of tetrises: ذටරऍƐඥժݹߝɿඍݷ౫ටฅڝ௨పໃܡ௨ඖІݮ௨ഗƊݹɷඝܘܢ௨پܘݓ௨ಮІܦ௨ชІݶΗʈາђடටවݹदඦܘݣ௨ಬໃƎௐڌໃݷಒටԠђௐڊಸݹࠂƣຜࡁரڀฮࡁਓȺಥɜਆ
- mlacks 5y agoi feel like it would only need to give long pieces...
- thaumasiotes 5y agoThere's nothing even slightly interesting about "Tetris which always gives you the best piece". The algorithm is as simple as can be: always give the long piece. This is doing something different, which can't be described by the given blurb.
- tome 5y agoThe board is ten cells wide so if you always get the long piece then it takes four pieces to make a line. Lovetris gives you two long pieces and then an S[1] which means you can make a line in three pieces. That's the sense in which Lovetris is "better" than your proposed algorithm. [1] if you lie the two long pieces horizontally next to each other against the left wall
- thaumasiotes 5y agoMaking a single line is a very bad thing to do in Tetris. You always want to make four lines simultaneously, and there's no easier way to do that than by stacking long pieces.
- tome 5y agoI'm not trying to argue what is a good or bad thing in Tetris. I'm trying to explain the algorithm. Hatetris tries to maximise the minimum time to removing a line; Lovetris, as explained by its author[1], flips a sign, thus it tries to minimise the minimum time to removing a line. If that contradicts your notion of "best piece" then either the author is being too imprecise or you are being too literal. Either way I don't think it's an interesting discussion. [1] https://news.ycombinator.com/item?id=27083716 https://news.ycombinator.com/item?id=27083716
- thaumasiotes 5y ago> Either way I don't think it's an interesting discussion. There is a worthwhile observation to make here, which is that even though Hatetris assigns scores to all the pieces and correctly determines, based on those scores, which one is the worst, Lovetris cannot correctly determine which piece is the best by picking "the opposite of what Hatetris does". Good is the opposite of bad, but the metrics for badness are not simultaneously metrics for goodness.
- erect_penis3 5y agoThis gets me hard.
- cm2187 5y agoThe problem is that if it wants you to complete a line in a certain way it will keep serving the same piece no matter what else you do.
- mayoff 5y agoAs other comments have noted, it's easy to get this implementation into a state where it throws "S" pieces at you over and over. It would be better if it used a variant of the Random Generator algorithm, which guarantees an equal distribution of pieces. https://tetris.fandom.com/wiki/Random_Generator https://tetris.fandom.com/wiki/Random_Generator Lovetris should choose, from the remaining pieces in the current bag, the one that it thinks is "best".
- whateveracct 5y agoSo just squares?
- mnouquet 5y agoThis is not working, I'm only getting S shape pieces.
- YeGoblynQueenne 5y agoI like it. You can get it to loop around a sequence, probably for ever: ଵටໂ໒௨ටಭݹ௧ଆඤݹ௨ඖಸݹளஶໃݑɷටॡݹறටໂວ௨ටໂٽ௨യժݹ௨ඥషݹઋقາח௨ඦІͻϢටƘঅணএဒݱРڠසމଯڠԮɥЬږ1 Edit: I wonder if you can do that with Hatetris also, if the difference is just flipping a sign as the author says.
- stormbrew 5y agoIn case anyone was wondering you can get it to infinitely spawn I pieces by just getting any kind of 3-deep 1-wide well anywhere, and then just keeping that well active, and it'll always give you I pieces: ϢටलݹઊƗȤڥ௨೯ಽݹॴਉПݹ௨ඥΒधԥටеݹఒௐໃޅݫටДݹ४Οໃࡑ௧پഋݹরΟະࠀ௨ೲໃԔԥඦܯ൫ஜуໄஈமΟະࡊѻ೯लܭЕڠฅɕসඤʈཧࢶكɑݚԥఫІݹஶɈໂɝЩටܬݹ௨ඩໃܭݹقฅ൫௨ටໃݹ௨൜ೡɕরටɓݷಏ୮ฅ൫వට౻ݷԥಀඤݪɷ੬ഫןЬكƬמ௨ඍȣݹ௨ටลஈಏඤɱџбඩແࡁ௨ඨʑעமҼใɕࢳচܘݹ௨ටd
- chews 5y agogot the fun one - ϢටາחஒටາɕଶϺເஈணಛזஈஐҲʩಱ௨ಇΚঀݣක൨ཧஓڐາஜௐงไऔࢶƣແࡑ௨ٯໃѠஓكƔݹமɨຯɓƐ೯ਗɒƏپІҁமҬҽћகڈງ൩ಳඤΚŦ௧ڄແࡥj൞ແࡑ௧ٯໃקஜsຽߟjඖИݸభටܤݷౚ൜ܔॠਯࡄȹࡨ௭Ӏไঅಳ༦Ͽࠇ৯ɜଖʣۑಲϼɪ३ࡃғݶլඝ૭טञΤһऑƏΣૹࢭ४WЅ൫সబςबਚตٮקߤڞЉݺԥ੯ܘऎஹؿકIظටෂܭݣೱૹॠઽೱϾא౫ටऐԃयప༮ȾಥժVѣԤงลஈஶϥЫɢݣങܗћமȾЈƸ௨ਵІƣدΣܐא౫ටलހਚڀฦӘಥ൞ࡋॿ౫ೱૹऔলට໓෧௧บܘԴ௨ॴໃԓଚපഉݺݳට༬ஈமටເђ௨Вȣݒ௧ϥಸࢠ௨ࠓƔݹ୦قӶɖɷජڛ൫ௐຂໃЋ௧αಭݺɷචՊݹஜsແࢭௐༀІܣ௨ঌໃv௧ʓଈѣלԊฐݒƃඦܪݹಎටƭƷஸ൶ถङஹس૪ॿಎظݕɥࢴقະߢਢഞบࢭশؿനєஓปȥݹகvૹऄরࡄଚࢢடඝૡƼಲʇДܥಳටȶɔѻRϼוϡɇݕƏېงลঅ௧ලล๐শطເוοтଖܡञƢЫݹࢳࡄරʤɶ৩ƫஜலڈฅஅಲڄໃܭҳ൞ෂݠணسວࢼథح๔ݢ൭శາזԫච৴ѰணػৠJथࡄժΜહঋඩसدƥ૮ࠁஐٯฅݶಈ౾Ͻࡁࢴقະॹοաݒկਙนͳܭޜӷ૮ࢭࢴقະࡨ௨ಅไݹಗقໃџɷටບZ௨ටໃݹ௨ටໃݹ௨ටໃݹ௧ƥІݷТsຯܖɾࡕ
- amptorn 5y agoI like how this is so low-effort that it still says "@ Things Of Interest" despite not being hosted there?