Sign in to follow this  
Followers 0
Max in montreal

using words with only certain characters

11 posts in this topic

Im trying to play a game, using autoit.

i have a list of words, about 3000 in total.

I can use only certain letters, I know this in advance.

I would like to guess different words, but by using only the allowed letters.

So lets say the allowed letters are a,b,c,t,s,w,g

i would then like to send

cat,bat,sat,gas....and the rest of the words on the list that use those letters. hat is on the list of words, but you cannot use hat because there is no H in the letters allowed.

So im actually looking for 2 things...a way to imput 16 letters, and a way to check the word so it is made with only the allowed letters...

what can i use?

Share this post


Link to post
Share on other sites



Hi,

is possible. Where is your problem? Or do you wait for somebody to write it?

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I want to write it, i would just like a hint to how i should go about it.

I have tried using the send command, and sending all the words on the list, but more often then not, the words cannot be used because they contain letters that are not usable.so before sending, i would like to see if the word will work, and if it does not, just to skip to the next word on the list.

I did not expect a whole solution, just some commands that i should look into.

Edited by Max in montreal

Share this post


Link to post
Share on other sites

I want to write it, i would just like a hint to how i should go about it.

I have tried using the send command, and sending all the words on the list, but more often then not, the words cannot be used because they contain letters that are not usable.so before sending, i would like to see if the word will work, and if it does not, just to skip to the next word on the list.

I did not expect a whole solution, just some commands that i should look into.

do you have to use all of the letters, or just any of them? i wrote a spreadsheet a while back to cheat on a word game on pogo, and i've got an anagram script too, but depending on the number of letters, it can really take a while


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Also, since there are hundreds of thousands of words in the English language, that may be something you should be thinking about.


[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

Also, since there are hundreds of thousands of words in the English language, that may be something you should be thinking about.

That doesn't really matter. the wordlist can be read into an array, or a giant string, and then results can be checked against the array/string, and sent if they match. The string approach is alot faster of course, or there are other ways to check 'words'. typically what i'll do, is use MS Office's spell checker via COM to spellcheck results.


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Thanks for the help in advance!

Basically i have a list of 3 and 4 letter words. about 4000 in total.

the game is played like boggle, where you get a 4 by 4, with a different letter in each. the object of the game is to guess words that can be made using the letters in the 4 by 4 grid, going up, down left right, diagonal, and so on.

so far all i did was send each word in my list. Its doing fine, but i would like to tweak it slowly getting better. the game only gives you 3 minutes to guess words, and if the letter s is not in the grid, i would not send words with the letter s in them...

so when the game starts, i want to be able to type in the 16 letters.

asktdergfrvedscd

check the first word in the list

dog

no good, the letter O in dog is not in the 16 letters typed in at the start of the program...next word

cat

all letters in cat are in the 16, so send the word cat.

thats it.

so far i am just sending words without checking

send words from my list that are made up of only those letters, would be more efficiant

Edited by Max in montreal

Share this post


Link to post
Share on other sites

Thanks for the help in advance!

Basically i have a list of 3 and 4 letter words. about 4000 in total.

the game is played like boggle, where you get a 4 by 4, with a different letter in each. the object of the game is to guess words that can be made using the letters in the 4 by 4 grid, going up, down left right, diagonal, and so on.

so far all i did was send each word in my list. Its doing fine, but i would like to tweak it slowly getting better. the game only gives you 3 minutes to guess words, and if the letter s is not in the grid, i would not send words with the letter s in them...

so when the game starts, i want to be able to type in the 16 letters.

asktdergfrvedscd

check the first word in the list

dog

no good, the letter O in dog is not in the 16 letters typed in at the start of the program...next word

cat

all letters in cat are in the 16, so send the word cat.

thats it.

so far i am just sending words without checking

send words from my list that are made up of only those letters, would be more efficiant

do the letters have to be arranged? i mean does the second letter of the word you're spelling have to be touching the first, or anything like that? it seems like, StringRegExp would be the way to go. you give the script the letters, then test each word in your list. There's a very good StringRegExp tutorial in the helpfile if you've not played with them yet.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

do the letters have to be arranged? i mean does the second letter of the word you're spelling have to be touching the first, or anything like that? it seems like, StringRegExp would be the way to go. you give the script the letters, then test each word in your list. There's a very good StringRegExp tutorial in the helpfile if you've not played with them yet.

I don't recommend the help file SRE guide, it hasn't really been updated since the revision in 3.1.108 (I believe it was 108).

This is the guide I use: http://perldoc.perl.org/perlre.html#Regular-Expressions


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

I don't recommend the help file SRE guide, it hasn't really been updated since the revision in 3.1.108 (I believe it was 108).

This is the guide I use: http://perldoc.perl.org/perlre.html#Regular-Expressions

thanks guys, thats just what i needed a push in the right direction, ill give this a try, and ill let you know how it worked.

for the other question, yes the letters have to be in a cretain order, but i might not have to go that far...

If i am sending 3 and 4 letter words, so far there are only 4000 in total...give or take... If cannot use the letter s, that will drastically reduce the word list, and so on...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0