« Back to All Topics
suggestions wanted
Posted in 
Four in a Row
suggestions wanted
Posted in 
Four in a Row
suggestions wanted
To anyone who isn't retired (jon and maybe 2 other people?) and/or still cares somewhat about connect four.

I'm working on a program that generates connect four stats that might be useful.  Actually it's the same program as before just now I'm adding a stats feature.  What type of stats?  It will have 4 different kinds of stats, all of which will overlap.

1) It will give the percentage of time each move is correct.  I predict 2/6 will be the highest, then 3/5, then 4, then 1/7.  4 would be the highest except there is only one middle column.  I think 4 will be higher than 2 or 6 individually.

2) I will tell it to focus on certain starts, and as it plays more and more games (it will eventually play every possible game), it will update the percentages for each start, and will have different percentages for each ply.  So for instance, say I tell it to look at 43 as one of the starts.  Every position after 43, it will record who is winning or if it's a draw, and which moves are the right moves (using Vianiato).  So once it's all done I'll be able to say for example, in any game that started out with 43, where say, 5 moves have been made, there is a 64% chance the game is a draw, 20% chance White is winning, and 16% chance Black is winning, and a 57% chance 4 is a correct move for Black.  This wouldn't be useful in a position you already know, but in an unfamiliar game, it could help you play faster cuz you'll know which moves to look at first.

3) Win % or draw % based on which colors have what threats.  Not very interesting but easy to do.

4) The one I'm most interested in: win % based on which spots each color has.  So for instance, what are the percentages if White has b2 and c2.  Or if White has b2 and Black has c2.  All kinds of stuff, i have a long list so far.  I just think it would be cool to be able to say things like, "White has c2 and e2 and 9 moves have been played and therefore there's a 53% chance he's winning and a 72% chance he needs to go 3 or 5 right now."


What I want from you guys is suggestions for #1 and #4, with #4 being more important.  For #1 you are allowed to make errors, they don't hafta be perfect starts.  For #4, any combination you think is interesting, and it can be any number of spots, but preferably under 10.  The 2 examples i gave focused on 2 spots.  I think my list covers all the good 2-spot combos.  So I'd like for you guys to think of 3-spots and higher.  Try to avoid obvious things like, if White has d2 and d3 and d4.  I already know the % for that would be stacked in White's favor.  Or stacked for Black if Black has all those.

Also, if you can think of more stats I should take, please tell.

Once i have the stats (months from now) i'll post em here, and there will be a program that tells you move by move what the stats are.

The book generator will only go up to 19 moves but I might let the stats go in the 20's.

Alsooo if any of you can think of combos for other board sizes then by all means give them.


I expect about 0 responses but that's okay lol.  But really it would only take a few minutes, just think off the top of your head.  If you want i'll post my list here but i don't think it's necessary.
hm I didn't get it by the first read, but it sounds interesting. Suggestions will come, but now I'll go swimming (30°C outside)
Congratulations, you just advanced a Geek level. Your geek level is now 82. I love you, but that doesn't help you in this matter and now Amy wants me to leave. I'll get back to you... *sends virtual love*
lol, i must emphasise both loils and eliten's responses, part from the 30 degrees bit and swimming its 23 degrees centigrade here :O. it does sond interesting and i shall have 2 read it a couple more times 2 fully understand, ill look 2 do 7x7 8x7 8x8 and maybe 10x10 if i can b bothered, ill ask JBL 2 have a look 2, im sure he can help you on a lot of board sizes as he is " the Wc4c" in 7x6, 8x7 and even 9x7 which is surprisingly easy.
oh ur in touch with JBL?  tell him to hurry up with his program!

Only 82?  Only a B- geek?!  What more do i have to do!

At work today i thought of some more stats to get. They are:

5) How often each row is needed in certain situations  (instead of just focusing on columns).

6) How often each diagonal is needed (there might be some strange unexpected pattern. It will probably just go along with what would be expected based on which column and/or row is needed, but if it doesn't, then something else is at play).

7) How often you need to make a move in XY plane in ___ situation.

8) Distance of current correct moves from the last move you made.  (all the different types of distance: horizontal, vetical, diagonal, sum of horizontal and vertical, and hypotenuse distance).

9) Distance of currect correct moves from opponent's move.

10) How often the correct move is in the same column/row/diagonal as your last move and opponent's last move. 

11) How often the correct move adjacent to a piece, or 2 spots away, or 3 spots away, when all spots are playable. 

12) How often the correct move is connected to a group of same-colored pieces.

These are all vaguely described but there are a bunch of these kinds of stats that might collectively shed insight into the game.


Two more things i'll also do besides the stats/book maker:

1) This'll take hardly any time: A defensive AI for vianiato that calculates a defensive move based on where it will force the opponent to play next (based on the real answers, not on stats).  For example, a move that makes the opponent need 6 is usually better than one that makes him need 4.  Also, a move that gives the opponent only one correct move on his next turn is usually better than one that gives him five good moves.  The AI would only kick in when all the bars are the other color or all bars are yellow.  (You wouldn't have to see the bars, it could hide the bars except for 1 pixel so that it could see them and you couldn't).    I'll do this and see how it compares to Vianiato's own defensive moves.  Eliten, is there a special algorithm it uses when it knows all moves are a loss or all moves are a draw?  Or does it use the same algorithm in all situations?

2) Months from now when I have all the stats, I'll make an actual AI complete with GUI, that will play totally based on the stats (or if necessary, it will override the stats if the stats don't tell it to block connect 4 and things like that). Option to manually adjust its built-in percentages to see how that affects its play.  I'd be curious to see if a stats-based prog would be any good.  It obviously would be a long way from perfect.  But it will use a search depth equal to however many plys there are stats for (which i said might be in the 20's).  I think it'll be fast but there will be a lot of loops so maybe not.

What shall i call the AI?  I'm thinking it should have "stat" in the name somewhere, or at least be related to stats.  Maybe something like Z-Score Four.  Or maybe EliteStat so it'll have part of your name eliten =]  Or even more clever, maybe it should be fstat86 lol

Ok no more essays i swear lol
fstal ur the highest geek lvl there is in my book :) and like always i didint finish reading ny of that because that gives me head aches but can u give me the idiot version of what the program is :|.
oyah and when would it be done.


D-dog

the idea about the antis is good, i was thinking, there is program you can use to help which has all board sizes up to 16x 16 i think. go 2 hermanns site and you will see it,its 4.5 stars and made by german guy called bauer. that coould help a lot. DMX your comment was not very subtle and very greedy, you jus want, want , want. never giving. first mustrum antis now a program fro fstal :O, u greedy dog, sum1 shud put u down :p
i give alot like i give money for 6 difrent subed name that are all permed now for "harrasing" (actrally i only paid for 2 names) :) but jon i give to fstal all the time but sometimes he just wants somthing im not willing to give :|


lol, i suspect u prefer recieving wht he wants :$, dont giv money 2 a big corporate brand like FoD giv it 2 the povery stricken ppl of america and other 3rd world countries not the corporate head honcho of FoD who has money galore.
like i said i only paid for 2 outa 6 of the subs ;)
who's he kidding, he prefers it all

idiot version of the last 2 posts:  i'm making like 5 different programs at once and even i lost track of them so i donno

Couple things i forgot to mention: 

In your suggestions (or lack thereof), the spots you say don't hafta be explicitly occupied.  You could specify something like, "White has c2, Black has c3, and Black 
doesn't
 have e2."  This would consider the position whether or not White has e2, but never if Black has it.  Or another kind of thing you can say is, "White c2, Black c3, and e2 is blank."  Which of course would only consider the position if neither White nor Black have e2.

The other thing: let me know if you're interested in this program I'm about to start, i'll have it done before the weekend, and if you want it i'll email it to you.  It will have 3 features:

1) It will give you the option of making vianiato say who wins without telling you the moves.  So for instance, if you did it for a blank board (probably by typing "who"), it would just say "White" but would hide all the bars so you wouldn't know you need the center.  

2) It will let you make Vianiato only solve a certain spot.  Like if you typed "who 5" it will turn the 5th bar to red white or yellow but no other bars.  

3) You can tell vianiato to only solve for a win, or a loss, or a draw (probably by typing "win" or "loss" or "draw").  So if you type "loss" when you're White, it will only show the red bars if there are any.


And ty for mentioning the 16x16 i'll check it out.
no **** fstal i know ur making a program i want the idiot version of what it does :@ im not that stupid :|
i assure u i will get round 2 telling you moves, im jus ambushed with 2 much work at moment, and im moving so not much time, but ur porg sounds enticing, cud u send me it pls? but how 2 giv u my email? :o
i knew you knew i was just saying i was too lazy to explain all them, but right now i have more energy so i'll explain now

1 of them will play every possible game in vianiato up to 19 moves so that vianiato will store the solutions in its database (ply files).  It will also collect a bunch of statistics as it is playing these games.

1 of them is the one i mentioned yesterday, which I explained pretty clearly though there are some more features that I didn't mention, let that be a surprise.

1 of them will make vianiato play defense a certain way.  For instance, say it's Vianiato's turn and it is Red and all bars are white.  The program will change the way Vianiato will think, and it will make a decision by look ahead 1 move.  So it will first consider 1, and make the move while covering the board so you can't see.  Then it will look at the bars, record how many white bars there are for you and where those bars are, then take the move back and do the same thing for 2, 3, and so on.  Once it has finished trying all 7 moves (or all possible moves), it will compare the results and pick the one that gives the least wins for you and/or the least obvious spots.

1 of them will be an actual program like vianiato or mustrum, except it won't be perfect, it will play based on the stats the other program will have recorded.

1 of them is a command center for vianiato, it will allow you to type commands in.  I might give it a GUI meaning you could click things instead of type.

And there might have been 1 or 2 other programs but if so, i forget at the moment.

Is that idiotic enough for you? :p
Not dumb enough:@ for dirty dog ;)
Tee hee
Wow I also just got a headache reading some of those posts, but fstal I think I like the idea. I always thought it would be cool if a program like vianiato also ranked each move for the second player. Currently, all second player moves are ranked equal (all losing) if first player plays perfect. You could make some algorithm that gives a value to each blue move based on how hard it is for red to win. I would define "hard" meaning red has to walk a very fine line to win. The program can still assign some random element to the antis, but the antis that present red with more trouble will be played with more frequency. 
Good idea about including randomness.  

So the first 4 i'll do, in order:

1) extra options for solver

2) defensive solver

3) Graphical expansion of vianiato.  This will be a box with extra commands, such as commands that do what the 2 programs above do.  For instance, a button you click to only solve for wins.  

4) Vianoobo. An AI for vianiato that purposely makes early errors, then plays perfectly (and using the defensive solver) afterwards to make it a challenge for you to win or draw.  For instance, the 433 games, 425, 431, 411, 43663, and so on, there are a bunch of good ones.  A lot of people could benefit from practicing with this, especially you Chubby since you'll be gambling with people who make errors.  Basically it will be like having a different level in Vianiato to play against other than perfect (there are other possible names besides "vianoobo", i'm still deciding).  I'll give it an opening book of the errors that are hard to beat.  That part will be a team effort, I know a good amount of them but I'll look at the Championship forum and i'll ask the other people who play like that.  
this program would be awesome...
would definitely make me much better.
hopefully you can pass to me when its done!
The progress will be even slower now because I just accepted a 500 dollar bet that I will reduce my mile (1609 meters) time by 2 minutes in 2 months (which means be able to run a 5 minute mile by August 30).  This will require a lot of training in something other than connect 4 lol.

But who knows maybe ill still have time to do some programming.  If not, it'll only be 2 months.  Oh who am i kidding, 2 months without connect 4 is an eternity =(  I will need support through these rough times. 
I just want to let you all know that I have nothing clever to say in this thread. Have a nice day