I think any computer can act as a server - the host, but there is no easy way to detect other players over the internet. Impossible without a server with a known address. But maybe (I'm absolutely not familiar with this) if both players send each other their IP it could work.
Indeed, but you need a static IP. So, the only way we can do this without each player setting a static IP and sending it to his/her friends is to have a server, which, like I said, is not affordable.
Very impressive. I checked out the project and looked at both branches. This isn't anything that I will be able to participate in anytime soon due to many other commitments, but it is very interesting, and I'm happy to give feedback and glad to keep an eye on the progress.
On the topic -- one thought I have is that it is easy to make AIs in games like Scrabble too cruel. An optimal winning algorithm is fairly easy, but no fun for human players to play against. A maximum scoring next word algorithm is fairly easy, but an AI who always plays their next available maximum scoring word is no fun for beginners to play against (even though such an AI also might not be competitive against top players without using simulation).
@jeremydouglass That shouldn't affect me, as my laptop couldn't possibly handle anything much - if the AI is too complex it would take atleast 20 seconds for it, but I want an AI that responds within 10 seconds time. So it would have to rely more on heuristics and not on brute force - something humans are inherently good at. So, yes, any AI I build will give the player a fair chance.
Say, does anyone here play Scrabble regularly enough to beat a medium complexity AI? I'm afraid I cannot play Scrabble well enough.
I see. When thinking about how easy it is to find next moves and score them I t looks like I really underestimated how much simulation and endgame optimization is necessary to beat top players!
To start, however, I would guess that very simple AIs like "next random word" (stupid), "next longest word", and "next highest scoring word" (ok) would do well for keeping beginners and casual players entertained, and that some might actually be too hard for intro to Scrabble.
@jeremydouglass I think that it wouldn't be too difficult to create a system where the player can choose between different AIs, I could implement a system where the player chooses between three difficulty levels. But for that, I need three different people willing to implement AIs. If that happens, one can build an easy AI, another medium and finally the last can build hard.
I expect that the absolute most powerful AI would take about 1-2 min on an ordinary laptop/tablet for each move, something that would make the game boring. Even the best AI (hard difficulty) for our game should be able to complete each move in less than 20 seconds.
@cameyo An interesting idea for sure. We'll see how it goes after I can get someone to build some test AIs. Do you think you could build an AI? Or can you test my Godmode to see if it works?
@Lord_of_the_Galaxy: I would love so much, although I do not know if I would be able (I just write programs for fun).
Unfortunately, at the moment, I do not have the time to do it.
I hope I have more time in the coming weeks.
@Chrisir OK, I'll do that. Since you're busy for about a week, I have enough time to get it done (hopefully). I must admit though, that I'm a bit intimidated by the idea of starting writing an AI for Scrabble all on my own, and that's why I hadn't yet done anything besides asking others how the Godmode is :-SS
I briefly tested godmode earlier this week by running it and entering moves for a few minutes, and it seemed to work fine! I also looked at the code and saw where Player / Computer selection happens. Were there any aspects of it in particular that you were concerned about testing?
@jeremydouglass Thanks! Now that it is confirmed that Godmode works, next step is to start working on an AI. That's something I haven't much idea of though.
I just wanted to make sure that -
The files are all in order and I haven't made some uploading error.
The select dialog works on other OS's also.
The comments in the tutorial file make sense to others.
So much, you have confirmed. The other thing is -
Someone might stumble on an error in my code. That hasn't happened so far, so I think it is good enough to continue forward with the AI.
excuse me for my silence but i was travelling (and working!!!) for 1month...As for my "scrabble" code it seems to run fine, even in complex situations; i have only to "clean" it and i ll' put it on line. I have not at all the same way to solve the problems, that is funny... I see also that i have methods for exchanging letters that i cannot find in yours, and method for saving a game at each moment and begin again at the the saved point. On the contrary i see that you can choose the number of players and (thinking that in real game it s only 1 or 2) i have not coded for that. As i have now to put the whole stuff in android mode i ll try to add that....And some other things (protest from 1 player, game-story...)
As for the "Godmode", i downloaded it but am unable to use it because it fires an error at the very beginning:
In this version (which seems to run without bugs...) there are a lot of things useless for now (as FTP), or things which can be judged useless ("propose some word ") and are useless as for the french version: but my real aim is to write a Scrabble for languages which have not "dictionnary" in the standard way (no academy...) and so i have imagined some kind of "jury" on line and a forum in order to create the reference dictionnary with and by the users of the game.
As i have explained in my previous post i am sure that the code can be much more better, and i ll change that in the android version i am now coding for.
thanks; as i am rewriting the code for android, i decided to change it in order to permit that players can be 1, 2,3, or 4; what i dont know is (supposing 4) how the order for playing is made (i mean not for the 1one but for the others? -Other question is about the number of letters in this case: is it always 7???
thanks;
As for "random choice for all players" i think it can be "geographically" weird when you play but it does not matter
As for "7": ok
The android code is quite ready (not written with P5 but with Eclipse and android native); main difficulty was to adapt the code to the display size: letters are too little, except for big tablets, in order to add drag & drop without a lot of errors, but i have found some workaround
As for AL i am now working fort that.
I ll put on line the android code as soon as possible.
the app for android is now ready, in french language only: that s why i dont put it on the playstore; that will be done as soon as i have created letters which dont exist in french and get a frequency table for scoring: but the code will remain the same.
the app is written with android native (i can give it if you want) because it was too much complicated to work with P5 for that; i seems to work, though sometimes there are weird bugs because of the little size of the screen and letters: it can happen that you "touch" 2 places on the grid with one finger! - let us say that this app is for tablets or for people with little fingers...
Functionnalities are the same than with the laptop version except that in this new one 4 players or 3 or 2 or 1 can play, at user's choice and that i have added a chronometer.
i am still working for the AL addon, but it is not simple...
i understand! - i get (quite) the same problem when using your code...of course it is easy to make some english version but as i have explained my final goal is neither english or french or....but languages without dictionnary (though in the present version there is an embedded french dictionnary in order to test).
language without dictionnary: there are 6000 languages in the world and 4000 are without any dictionnary (and are not written languages): as for me i am corsican and 1) there is a corsican language that people know well or not well (depends of the age) 2) corsican language was and is written 3) but there are a lot of "dialects" - let us say 10 or probably more - and there is not any dictionnary, nor any "Academy": so in my app only some basic dictionnary is embedded and users can propose new words or "variants" that are examined by some kind of on line "jury" (each of the 7 members receive automatically an email) and if approved are added to the dictionnary: so the dictionnary is made by users themeselves.
As for the second question, yes, it's a typo; but in this moment i have not choosen a strategy to solve that and i think it s not easy to find one: of course the computer at each turn can calculate all the possible words with its letters, it can also calculate the chances for getting some letter when exchanging, but this is only for 1 turn, it is not a strategy, && it does not really take in account the other player!
if you let the jury not only approve a word but enter one or two meanings (either in corsican or in French) you could use scrabble to let people build a real dictionary and publish it online or as a book even
in a new mode you could let them enter meanings for words that already exist in your dictionary
THANKS A LOT!!! - i am happy to see that somebody understands what i am trying to do for a lot of languages: not edifying some kind of abstract (Academy) dictionnary but a real (&& in progress!) one, from the users; as for the "jury" it will be made by people issued from the (main) "dialects": they have not to propose but validate or invalidate what the user (explaining why, explaining in which part of the country he/she is born...) ; as for "meanings" ("for words existing...") i dont think that it is useful for Scrabble! : the question is only: is this word an existing word (in some place, in some dialect) -And be sure that for some examples there are 20 words or "forms" which can be validated.
Let us say in a more general way: instead of thinking the lack of an official dictionnary as negative think that like a chance against uniformity...
Comments
I think any computer can act as a server - the host, but there is no easy way to detect other players over the internet. Impossible without a server with a known address. But maybe (I'm absolutely not familiar with this) if both players send each other their IP it could work.
Indeed, but you need a static IP. So, the only way we can do this without each player setting a static IP and sending it to his/her friends is to have a server, which, like I said, is not affordable.
UPDATE: After a long time, the Godmode is finally complete - https://github.com/Lord-of-the-Galaxy/Scrabble/tree/ai_framework/ScrabbleGodmode.
Anyone interested can immediately start work on an AI.
Please test and comment.
Thanks!
So, @Chrisir @akenaton @jeremydouglass @kfrajer @cameyo and @colouredmirrorball Did anyone see it (the Godmode)? If so, how is it?
I meant to check it out this weekend but just it didn't happen. i did check a previous version... maybe later today or tomorrow.
Kf
@kfrajer Cool, thanks!
@Lord_of_the_Galaxy: i'll check out the next week.... My parents need my presence :)
Very impressive. I checked out the project and looked at both branches. This isn't anything that I will be able to participate in anytime soon due to many other commitments, but it is very interesting, and I'm happy to give feedback and glad to keep an eye on the progress.
On the topic -- one thought I have is that it is easy to make AIs in games like Scrabble too cruel. An optimal winning algorithm is fairly easy, but no fun for human players to play against. A maximum scoring next word algorithm is fairly easy, but an AI who always plays their next available maximum scoring word is no fun for beginners to play against (even though such an AI also might not be competitive against top players without using simulation).
@jeremydouglass That shouldn't affect me, as my laptop couldn't possibly handle anything much - if the AI is too complex it would take atleast 20 seconds for it, but I want an AI that responds within 10 seconds time. So it would have to rely more on heuristics and not on brute force - something humans are inherently good at. So, yes, any AI I build will give the player a fair chance.
Say, does anyone here play Scrabble regularly enough to beat a medium complexity AI? I'm afraid I cannot play Scrabble well enough.
@cameyo Thanks!
@Lord_of_the_Galaxy -
I see. When thinking about how easy it is to find next moves and score them I t looks like I really underestimated how much simulation and endgame optimization is necessary to beat top players!
https://en.m.wikipedia.org/wiki/Maven_(Scrabble)#Algorithms
To start, however, I would guess that very simple AIs like "next random word" (stupid), "next longest word", and "next highest scoring word" (ok) would do well for keeping beginners and casual players entertained, and that some might actually be too hard for intro to Scrabble.
@jeremydouglass I think that it wouldn't be too difficult to create a system where the player can choose between different AIs, I could implement a system where the player chooses between three difficulty levels. But for that, I need three different people willing to implement AIs. If that happens, one can build an easy AI, another medium and finally the last can build hard.
I expect that the absolute most powerful AI would take about 1-2 min on an ordinary laptop/tablet for each move, something that would make the game boring. Even the best AI (hard difficulty) for our game should be able to complete each move in less than 20 seconds.
@Lord_of_the_Galaxy: could be interesting an AI who play at different levels (i.e when he is losing, then he plays better) :)
@cameyo An interesting idea for sure. We'll see how it goes after I can get someone to build some test AIs. Do you think you could build an AI? Or can you test my Godmode to see if it works?
@Lord_of_the_Galaxy: I would love so much, although I do not know if I would be able (I just write programs for fun).
Unfortunately, at the moment, I do not have the time to do it. I hope I have more time in the coming weeks.
I got visitors for a week now, so i don't have time unfortunately.
But can you just post the link for AI prepared with Godmode?
And describe what your AI framework does and where to insert the AI (which tab / class)?
What must the AI / to which functions does it talk?
@Chrisir OK, I'll do that. Since you're busy for about a week, I have enough time to get it done (hopefully). I must admit though, that I'm a bit intimidated by the idea of starting writing an AI for Scrabble all on my own, and that's why I hadn't yet done anything besides asking others how the Godmode is :-SS
I briefly tested godmode earlier this week by running it and entering moves for a few minutes, and it seemed to work fine! I also looked at the code and saw where Player / Computer selection happens. Were there any aspects of it in particular that you were concerned about testing?
@jeremydouglass Thanks! Now that it is confirmed that Godmode works, next step is to start working on an AI. That's something I haven't much idea of though.
I just wanted to make sure that -
So much, you have confirmed. The other thing is -
@Chrisir try reading the comments in the Scrabble Godmode "SampleAIPlayer" tab, and also in the tutorial.sbs file.
@Lord_of_the_Galaxy===
excuse me for my silence but i was travelling (and working!!!) for 1month...As for my "scrabble" code it seems to run fine, even in complex situations; i have only to "clean" it and i ll' put it on line. I have not at all the same way to solve the problems, that is funny... I see also that i have methods for exchanging letters that i cannot find in yours, and method for saving a game at each moment and begin again at the the saved point. On the contrary i see that you can choose the number of players and (thinking that in real game it s only 1 or 2) i have not coded for that. As i have now to put the whole stuff in android mode i ll try to add that....And some other things (protest from 1 player, game-story...)
As for the "Godmode", i downloaded it but am unable to use it because it fires an error at the very beginning:
File selectedFile = fileChooser.showOpenDialog(null);
err= No library found for javafx.stage.FileChooser No library found for javafx.stage...
Probably that i have not understood how to use it!
@Lord_of_the_Galaxy===
my (french) vrsion for scrabble is on line && can be downloaded (windows, osX,linux) on my site, here:: akenaton-docks.fr/AKENATON_f/scrabble.html
In this version (which seems to run without bugs...) there are a lot of things useless for now (as FTP), or things which can be judged useless ("propose some word ") and are useless as for the french version: but my real aim is to write a Scrabble for languages which have not "dictionnary" in the standard way (no academy...) and so i have imagined some kind of "jury" on line and a forum in order to create the reference dictionnary with and by the users of the game.
As i have explained in my previous post i am sure that the code can be much more better, and i ll change that in the android version i am now coding for.
very impressive!
Thank you!
Sorry for my absence too, I had work and haven't seen the forum since a week.
I will check out your code as soon as in can and try to learn from it.
@Chrisir @Lord_of_the_Galaxy===
thanks; as i am rewriting the code for android, i decided to change it in order to permit that players can be 1, 2,3, or 4; what i dont know is (supposing 4) how the order for playing is made (i mean not for the 1one but for the others? -Other question is about the number of letters in this case: is it always 7???
A) I guess a random choice? B) It's always 7
But what do you mean by 1 player? Do you have an AI ready?
Sorry for the late reply @akenaton
@Lord_of_the_Galaxy===
thanks; As for "random choice for all players" i think it can be "geographically" weird when you play but it does not matter As for "7": ok The android code is quite ready (not written with P5 but with Eclipse and android native); main difficulty was to adapt the code to the display size: letters are too little, except for big tablets, in order to add drag & drop without a lot of errors, but i have found some workaround As for AL i am now working fort that. I ll put on line the android code as soon as possible.
Cool!
@Lord_of_the_Galaxy===
the app for android is now ready, in french language only: that s why i dont put it on the playstore; that will be done as soon as i have created letters which dont exist in french and get a frequency table for scoring: but the code will remain the same.
it can be downloaded here:
akenaton-docks.fr/AKENATON_f/scrabbleDownload/
called "Scrabblu.apk"
minSdk target: 16
Please try it && tell me what happens!
the app is written with android native (i can give it if you want) because it was too much complicated to work with P5 for that; i seems to work, though sometimes there are weird bugs because of the little size of the screen and letters: it can happen that you "touch" 2 places on the grid with one finger! - let us say that this app is for tablets or for people with little fingers...
Functionnalities are the same than with the laptop version except that in this new one 4 players or 3 or 2 or 1 can play, at user's choice and that i have added a chronometer.
i am still working for the AL addon, but it is not simple...
Okay, will check (hopefully no dictionary)
I'm sorry, I simply couldn't understand anything in the game, I can't read so much French. Sorry.
( @akenaton )
@Lord_of_the_Galaxy===
i understand! - i get (quite) the same problem when using your code...of course it is easy to make some english version but as i have explained my final goal is neither english or french or....but languages without dictionnary (though in the present version there is an embedded french dictionnary in order to test).
AL = AI ?
What do you mean by language without dictionary...?
@Chrisir===
language without dictionnary: there are 6000 languages in the world and 4000 are without any dictionnary (and are not written languages): as for me i am corsican and 1) there is a corsican language that people know well or not well (depends of the age) 2) corsican language was and is written 3) but there are a lot of "dialects" - let us say 10 or probably more - and there is not any dictionnary, nor any "Academy": so in my app only some basic dictionnary is embedded and users can propose new words or "variants" that are examined by some kind of on line "jury" (each of the 7 members receive automatically an email) and if approved are added to the dictionnary: so the dictionnary is made by users themeselves.
As for the second question, yes, it's a typo; but in this moment i have not choosen a strategy to solve that and i think it s not easy to find one: of course the computer at each turn can calculate all the possible words with its letters, it can also calculate the chances for getting some letter when exchanging, but this is only for 1 turn, it is not a strategy, && it does not really take in account the other player!
thank you for your reply!
if you let the jury not only approve a word but enter one or two meanings (either in corsican or in French) you could use scrabble to let people build a real dictionary and publish it online or as a book even
in a new mode you could let them enter meanings for words that already exist in your dictionary
@Chrisir===
THANKS A LOT!!! - i am happy to see that somebody understands what i am trying to do for a lot of languages: not edifying some kind of abstract (Academy) dictionnary but a real (&& in progress!) one, from the users; as for the "jury" it will be made by people issued from the (main) "dialects": they have not to propose but validate or invalidate what the user (explaining why, explaining in which part of the country he/she is born...) ; as for "meanings" ("for words existing...") i dont think that it is useful for Scrabble! : the question is only: is this word an existing word (in some place, in some dialect) -And be sure that for some examples there are 20 words or "forms" which can be validated. Let us say in a more general way: instead of thinking the lack of an official dictionnary as negative think that like a chance against uniformity...
i fully agree
also:
you don't think it's necessary for scrabble and you are right.
scrabble would just be a way to motivate people to work on a dictionary (with meanings). A dictionary would be a cool goal beyond scrabble.
@Chrisir===
exactly, scrabble (as for me!) is only a way....And, in some sense "coding" also (though it could be a job!) -
I haven't been checking this forum lately, sorry
@akenaton: For a dictionary also see
https://en.wiktionary.org/wiki/