Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upMost of the puzzles are easily solvable by excluding the chars present in the right side of screen. #3
Comments
KOLANICH
changed the title from
Most of the puzzles are easily solvable by excluding the chars present in the left side of screen.
to
Most of the puzzles are easily solvable by excluding the chars present in the right side of screen.
Jul 30, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Jul 30, 2015
Owner
What level are you on? It get's harder later on, but if you think that it stays the same, I could change the score algorithm to maybe look at the past strategies and give you less points if you used it too often, leading to the level lowering itself.
|
What level are you on? It get's harder later on, but if you think that it stays the same, I could change the score algorithm to maybe look at the past strategies and give you less points if you used it too often, leading to the level lowering itself. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
KOLANICH
Jul 31, 2015
I mean that now the optimal strategy in most cases is such:
1 create a regex [^]+
2 enumerate words
3 enumerate chars in each word, put them into list, tag each char with the word where it is present
4 check wheither the char is present in words from the left side, if it is exclude it from the list
5 sort chars by the count of words they are present in
6 take the minimal subset of chars present in all words from the right side
7 put them into regex before the last square bracket
For example if we have
Jfnd jemx
,rpcn djnr
Ufkz hxne
the winning regex will be [^je]+
KOLANICH
commented
Jul 31, 2015
|
I mean that now the optimal strategy in most cases is such: |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
KOLANICH
Jul 31, 2015
There is an easy way to distract this strategy: make sure that all the chars from the right are present in the left.
KOLANICH
commented
Jul 31, 2015
|
There is an easy way to distract this strategy: make sure that all the chars from the right are present in the left. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Jul 31, 2015
Owner
I wouldn't want to totally eliminate the strategy, but giving the player less chances to use it seems good enough. This could be done by having less characters on the right side than on the right. Adding to that the history-based points (maybe even negative point), it could be work out well.
|
I wouldn't want to totally eliminate the strategy, but giving the player less chances to use it seems good enough. This could be done by having less characters on the right side than on the right. Adding to that the history-based points (maybe even negative point), it could be work out well. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
KOLANICH
Jul 31, 2015
The fact is that it is best, it seems that it gives the shortest regex. So I think that since some difficulcy (not far from the beginning, maybe after 5 puzzles) the probability that the puzzle is solvable using this strategy should be negligible to make user use another one. Also the difficulcy raises too slowly, the rate should be increased not to make the game boring.
KOLANICH
commented
Jul 31, 2015
|
The fact is that it is best, it seems that it gives the shortest regex. So I think that since some difficulcy (not far from the beginning, maybe after 5 puzzles) the probability that the puzzle is solvable using this strategy should be negligible to make user use another one. Also the difficulcy raises too slowly, the rate should be increased not to make the game boring. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Jul 31, 2015
Owner
I still don't really want to exclude a possibility totally, but I agree that future versions should make it harder to use. Excluding it would oppose the idea I had for the game, declaring a few functions and algorithms that describe the whole game. You see, it's more of a proof of concept, than an entertainment spectacle.
Regarding the difficulty, the current level generation can be found here:
diff = (int) Math.round(1.2*Math.sqrt((prefs.getInt(SCORE, 0) + score * 1.1 + 1) / (game + 1)));I am still optimizing the function to not grow too slowly. I may also have to modify the points calculation too:
return Math.round(((max - len)/2+1) * (1 / ((Math.abs(right - wrong) + 1)) + 3 * calcVal(regex)));Any suggestions are appreciated.
|
I still don't really want to exclude a possibility totally, but I agree that future versions should make it harder to use. Excluding it would oppose the idea I had for the game, declaring a few functions and algorithms that describe the whole game. You see, it's more of a proof of concept, than an entertainment spectacle. Regarding the difficulty, the current level generation can be found here: diff = (int) Math.round(1.2*Math.sqrt((prefs.getInt(SCORE, 0) + score * 1.1 + 1) / (game + 1)));I am still optimizing the function to not grow too slowly. I may also have to modify the points calculation too: return Math.round(((max - len)/2+1) * (1 / ((Math.abs(right - wrong) + 1)) + 3 * calcVal(regex)));Any suggestions are appreciated. |
This was referenced Aug 1, 2015
phikal
self-assigned this
Aug 2, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ghost
Aug 4, 2015
Hello,
I really like the idea of the game but I ran in the same trouble then KOLANICH (played only until level 9). It's not that hard to solve the puzzles.
And I would like to have more "real life" problems, like matching a certain URL and another one not (or maybe even subsetting, backward references, etc.) or matching a certain words in a sentence and so on. I know this is hard to randomize or auto generate but would make the game much more interesting.
However, nice idea! ;-)
ghost
commented
Aug 4, 2015
|
Hello, I really like the idea of the game but I ran in the same trouble then KOLANICH (played only until level 9). It's not that hard to solve the puzzles. And I would like to have more "real life" problems, like matching a certain URL and another one not (or maybe even subsetting, backward references, etc.) or matching a certain words in a sentence and so on. I know this is hard to randomize or auto generate but would make the game much more interesting. However, nice idea! ;-) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Aug 5, 2015
Owner
|
@bastorran after thinking about it for a bit, I realized what I intended
when writijg the code (was a while between finishing and publishing), when
you use @KOLANICH's solution that always works, you'll rarely 100 points
per round, usually about 80, which just isn't enough to level up past level
9.
To get any further you will need to use complex regular expressions, with
as many regular expression characters as possible. It's not ideal, but
since the game was more of a proof of concept than anything else, it worked
fine. But as mentioned, the score calculations should be improved in
general.
I am just using random characters (with increasing range and length through
the game), because I realized that it is particularly hard to generate
dictionary words without internet connection (at least in java as far as I
know), not to speak of URLs or anything of that kind. I don't want to add
(IMO) unnecessary permissions to a game intended to not waste space WSE.
The random characters do seem to do the job (most of the time), although
currently there is no connection between any of the words, so that could
also be improved to make it more "real word".
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
KOLANICH
commented
Aug 5, 2015
|
Hmm, look at http://regexcrossword.com and https://regex.alf.nu/ |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Aug 20, 2015
Owner
First of all I appologize for not fixing the issues earlier - I didn't have access to a computer with all the tool necessary, so I had to wait until I got home from my holidays.
Regarding the cheats like [^xzy]* or the qwe|rty|yui cheat mentioned in #4: after testing it I have realized that you can't actually level up past lvl 6-8 (approx.). To go beyond these levels you have to use more complex regular expressions to get at least +100 points (my high score was +225, maybe that should be in statistics too). I'm not saying that the specific numbers from the calculation should not be changed, but in itself it creates the game I intend it to be. The sqrt method lets the game go on forever while getting harder all the time. If you can't (or don't want to) solve a puzzle, you can use the hacks from above - but with the risk of maybe losing a level (can happen, especially after lvl. 11). All in all it seems fine for now - especially with the pop up implemented from #9. From my point of view I believe the issue can be closed, and I hope nobody had too much of a problem with it.
and to @KOLANICH's last message: http://regexcrossword.com is completely the opposite, while https://regex.alf.nu/ seems to have a set number of rounds. Both games are static and finite, while ReGeX is dynamic and infinite. regex.alf (f.e.) has the benefit of never having bad rounds, while ReGeX may have good or bad rounds by chance. I don't want my game to just be a clone, it it's not intended to be.
|
First of all I appologize for not fixing the issues earlier - I didn't have access to a computer with all the tool necessary, so I had to wait until I got home from my holidays. Regarding the cheats like and to @KOLANICH's last message: http://regexcrossword.com is completely the opposite, while https://regex.alf.nu/ seems to have a set number of rounds. Both games are static and finite, while ReGeX is dynamic and infinite. regex.alf (f.e.) has the benefit of never having bad rounds, while ReGeX may have good or bad rounds by chance. I don't want my game to just be a clone, it it's not intended to be. |
phikal
closed this
Aug 20, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Oct 25, 2015
Owner
I forgot about this, but this issue should be reopened with #18. I am about to finish implementing game modes and a mode to contribute to the database, in order to get @bastorran's "real world" problems.
|
I forgot about this, but this issue should be reopened with #18. I am about to finish implementing game modes and a mode to contribute to the database, in order to get @bastorran's "real world" problems. |
phikal
reopened this
Oct 25, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
KOLANICH
commented
Nov 16, 2015
|
What is redb? I'm unable to connect to http://redb.uk |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Nov 16, 2015
Owner
@KOLANICH I still haven't published v1.2, because I'm still working on REDB.
REDB (Regular Expression Database) is a concept suggested in #18, and it will basically be a site on http://redb.uk (I'm planning to buy that domain or a similar one) , where people can suggest, vote on Tasks for ReGeX and can look into suggested results. I hope it will integrate the real world problems mentioned before in this thread. ---> The site is still not up, so the REDB game mode isn't functioning yet.
If you want to test it, uncompress this archive, use python -m SimpleHTTPServer in the resulting directory and configure the REDB server to request from the local address you're hosting on.
|
@KOLANICH I still haven't published v1.2, because I'm still working on REDB. REDB (Regular Expression Database) is a concept suggested in #18, and it will basically be a site on http://redb.uk (I'm planning to buy that domain or a similar one) , where people can suggest, vote on Tasks for ReGeX and can look into suggested results. I hope it will integrate the real world problems mentioned before in this thread. ---> The site is still not up, so the REDB game mode isn't functioning yet. If you want to test it, uncompress this archive, use |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
oleastre
Nov 18, 2015
As I also started using your nice app, I quickly come to the conclusion that by simply excluding some characters it's easy to solve.
A simple idea I had this morning is why not take the problem in the other way around: generate a random regex and from there generate a list of matching string (with a max regex length).
For inverse regex, there are already some existing libs:
https://github.com/mifmif/Generex
https://github.com/bluezio/xeger
oleastre
commented
Nov 18, 2015
|
As I also started using your nice app, I quickly come to the conclusion that by simply excluding some characters it's easy to solve. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Nov 18, 2015
Owner
@oleastre great idea, but I see two problems:
- I'd have to write a random ReGeX generator.
- How do I generate strings that don't match.
I just woke up, so I'm not in top logical problem solving shape, but I presume both would be possible (why shouldn't they be? efficiency would be the first problem). Other than that, I really like the idea, I already have a RandomGenerator class somewhere, and all I'd have to do is rewrite it. The procedure the generator uses could also be added as a option in the game mode settings (Classic vs Reverse). But for now, I believe that should be a task for 1.3 - not taking personal stuff into account - I still haven't finished the REDB server, which I want to be the main feature of the 1.2 release. But I'm certainly going to look into it.
Edit [18/11/15]: Potentially solving problems 1. & 2.: What if I randomly generate the "match" string like I'm used to, then create a ReGeX that matches all of those (I know there's some perl libary for that - so I'd guess there's a java one too), then use Generex and generate strings with the negated regular expression ((?!...)). Might or might not work, as I said, I just woke up.
|
@oleastre great idea, but I see two problems:
I just woke up, so I'm not in top logical problem solving shape, but I presume both would be possible (why shouldn't they be? efficiency would be the first problem). Other than that, I really like the idea, I already have a Edit [18/11/15]: Potentially solving problems 1. & 2.: What if I randomly generate the "match" string like I'm used to, then create a ReGeX that matches all of those (I know there's some perl libary for that - so I'd guess there's a java one too), then use Generex and generate strings with the negated regular expression ( |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
oleastre
Nov 18, 2015
It's just an idea, and I have not tried to overcome all logical problem before posting.
Of course it's not an easy task to get it working, but it can probably be used to generate more challenging problems (for advanced difficulty levels ?).
Generating random regex should not be a real problem; I think about constructing a random tree structure to model repetitions, character class matching and sub patterns.
Generating non matching strings could be done by creating another regex that negates some of the properties of the original one (inverse character class, replace a number of repetitions, ...). If the initial regex if created using a tree structure, it could be done by replacing some of the tree nodes (or even have some node types that can return an inverted regex part).
If I find some time to do a POC, I will try to send you some code, and it can of course wait for later version of the game.
oleastre
commented
Nov 18, 2015
|
It's just an idea, and I have not tried to overcome all logical problem before posting. Of course it's not an easy task to get it working, but it can probably be used to generate more challenging problems (for advanced difficulty levels ?). Generating random regex should not be a real problem; I think about constructing a random tree structure to model repetitions, character class matching and sub patterns. Generating non matching strings could be done by creating another regex that negates some of the properties of the original one (inverse character class, replace a number of repetitions, ...). If the initial regex if created using a tree structure, it could be done by replacing some of the tree nodes (or even have some node types that can return an inverted regex part). If I find some time to do a POC, I will try to send you some code, and it can of course wait for later version of the game. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Zamubafoo
Feb 9, 2016
To extend this issue, you can also just enter the desired strings and place an or operator and pass right through nearly all the challenges.
For example,
desired: ie, gah
exclude: e,ah,uai
You can just enter "ie|gah".
Zamubafoo
commented
Feb 9, 2016
|
To extend this issue, you can also just enter the desired strings and place an or operator and pass right through nearly all the challenges. For example,
You can just enter "ie|gah". |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Feb 9, 2016
Owner
@Zamubafoo That was discussed in #4, and the idea was that there should always be a way out when you can't solve a puzzle, leading to the conclusion to set the max chars to be at least as long to let that happeen. Of course solving it it very simple, but until now you wouldn't be able to progress further into the game when you used that strategy all the time, because you wouldn't be getting any points.
What could be possible, if this is concidered a good strategy, but not obvious, would be to warn they player about it when tried to too often, or of course limit it totally.
As soon as REDB launches this will be a totally different problem anyway.
|
@Zamubafoo That was discussed in #4, and the idea was that there should always be a way out when you can't solve a puzzle, leading to the conclusion to set the max chars to be at least as long to let that happeen. Of course solving it it very simple, but until now you wouldn't be able to progress further into the game when you used that strategy all the time, because you wouldn't be getting any points. What could be possible, if this is concidered a good strategy, but not obvious, would be to warn they player about it when tried to too often, or of course limit it totally. As soon as REDB launches this will be a totally different problem anyway. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Zamubafoo
Feb 10, 2016
Oh, I didn't see that it was already brought up.
In my opinion, I think intuitively a pass button in the menu would be more effective than allowing this.
Zamubafoo
commented
Feb 10, 2016
|
Oh, I didn't see that it was already brought up. In my opinion, I think intuitively a pass button in the menu would be more effective than allowing this. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Feb 10, 2016
Owner
Funnily enough, there is one. Try long pressing the char-counter. You will move on to the next round, but you will loose a percentage of your points. That should probably be built into some in-game help system, if not mentioned somewhere. But I'm possibly afraid people wouldn't read that.
On 10 February 2016 05:08:32 EET, Zamubafoo notifications@github.com wrote:
Oh, I didn't see that it was already brought up.
In my opinion, I think intuitively a pass button in the menu would be
more effective than allowing this.
Reply to this email directly or view it on GitHub:
#3 (comment)
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Funnily enough, there is one. Try long pressing the char-counter. You will move on to the next round, but you will loose a percentage of your points. That should probably be built into some in-game help system, if not mentioned somewhere. But I'm possibly afraid people wouldn't read that. On 10 February 2016 05:08:32 EET, Zamubafoo notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Sep 8, 2016
Owner
Took me longer than I though, but since #18 is closed, and REDB is running, this issue should be "solved" for now. I also tried and change a few things regarding the random character generator, so I'll see how people respond to that.
As soon as the database has enough tasks (and maybe I get a few new translations I've been asking a few friends for) I will publish v1.3.
|
Took me longer than I though, but since #18 is closed, and REDB is running, this issue should be "solved" for now. I also tried and change a few things regarding the random character generator, so I'll see how people respond to that. As soon as the database has enough tasks (and maybe I get a few new translations I've been asking a few friends for) I will publish |
phikal
closed this
Sep 8, 2016
phikal
reopened this
Aug 22, 2017
phikal
modified the milestone:
v1.4
Aug 24, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Hugo-Trentesaux
May 21, 2018
Because strings are random, it is very easy to write short regexp which describes just a part of the strings :
example
match :
- akzdjbf
- fkvdfk
- jbvj
do not match :
- gdada
- fkdl
- dfdbn
regexp :
^(a|fkv|j).*
algorithm to produce this regexp :
- write
^( - write the first letter of the first word
- if this letter is not the first letter from "do not match" word write
|else write the second letter (and so on) - write
).*when you are finished
The interest of regular expression is to condense the meaning (information) of a string. If there is no meaning (random) there is no interest.
The random game is useless. But an "extract information" game as in this tutorial might be interesting.
Hugo-Trentesaux
commented
May 21, 2018
|
Because strings are random, it is very easy to write short regexp which describes just a part of the strings : example match :
do not match :
regexp : algorithm to produce this regexp :
The interest of regular expression is to condense the meaning (information) of a string. If there is no meaning (random) there is no interest. The random game is useless. But an "extract information" game as in this tutorial might be interesting. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
May 25, 2018
Owner
@Hugo-Trentesaux To be fair, ReGeX is more of a proof-of-concept than a challenging puzzle-game. And btw, the regular expression always has to match the whole string, so ^ (and $) aren't necessary.
Sadly I don't quite have the time to really work on ReGeX anymore... but when (if at all) I manage to get around, the random game can be improved by implementing reverse-regular expressions, to make it a bit less "useless" (where, if I want to be fair, wouldn't quite agree, expecially on levels 14+).
And finally: The last time I re-wrote ReGeX, and actually created the infrastructure of a "extraction game". When I get around to it, I will take a look at the tutoral you linked, to see what would make sense to also adopt.
|
@Hugo-Trentesaux To be fair, ReGeX is more of a proof-of-concept than a challenging puzzle-game. And btw, the regular expression always has to match the whole string, so Sadly I don't quite have the time to really work on ReGeX anymore... but when (if at all) I manage to get around, the random game can be improved by implementing reverse-regular expressions, to make it a bit less "useless" (where, if I want to be fair, wouldn't quite agree, expecially on levels 14+). And finally: The last time I re-wrote ReGeX, and actually created the infrastructure of a "extraction game". When I get around to it, I will take a look at the tutoral you linked, to see what would make sense to also adopt. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
KOLANICH
May 25, 2018
I wonder if it is possible to create a generator of hard sets of cases with adversarial reinforcement learning.
KOLANICH
commented
May 25, 2018
|
I wonder if it is possible to create a generator of hard sets of cases with adversarial reinforcement learning. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
May 25, 2018
Owner
While I'm not going to claim that it is impossible, I do belive that something like that would be outside of the scope of a quasi-"hobby project" like this one. If someone were to submit a pull-request adding such a thing, great, but otherwise I wouldn't want to guess that something so sophisticated would be added in the (close) future.
|
While I'm not going to claim that it is impossible, I do belive that something like that would be outside of the scope of a quasi-"hobby project" like this one. If someone were to submit a pull-request adding such a thing, great, but otherwise I wouldn't want to guess that something so sophisticated would be added in the (close) future. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wilyarti
Jun 6, 2018
I have two ideas:
1.) Create 3x 80 char strings that are mutated slightly. The user has to select the correct one via regex.
2.) Create a blob of text that the user has to extract value(s) from.
The difficulty could be increased by setting time limits or restricting the use of the previously mentioned cheat regex's.
Excellent game by the way. I really enjoyed solving the reg expressions. This is exactly what we need to over come the fear of regex.
wilyarti
commented
Jun 6, 2018
•
|
I have two ideas: 1.) Create 3x 80 char strings that are mutated slightly. The user has to select the correct one via regex. The difficulty could be increased by setting time limits or restricting the use of the previously mentioned cheat regex's. Excellent game by the way. I really enjoyed solving the reg expressions. This is exactly what we need to over come the fear of regex. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phikal
Jun 8, 2018
Owner
@wilyarti Those are two concepts which would would be very fit for their own game modes. I've been thinking about some code-reorganisation recently, so I will try to think about those when doing that. Especially the first sounds interesting...
|
@wilyarti Those are two concepts which would would be very fit for their own game modes. I've been thinking about some code-reorganisation recently, so I will try to think about those when doing that. Especially the first sounds interesting... |
KOLANICH commentedJul 30, 2015
No description provided.