Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#26 2007-04-14 00:46:53

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: Four In A Line Flash Version

Case 4:

Reply:

At this point, if opponent drops on either of the end columns, victory would be yours (simply drop on top of their last coin). So, no choice for your opponent.

You win again! big_smile

If you have more than four columns, there would be no need for Case 4 because you will always be able to force the game to the scenario of either Case 1 or Case 2 above. cool

Last edited by JaneFairfax (2007-04-14 01:03:34)


Q: Who wrote the novels Mrs Dalloway and To the Lighthouse?

A: Click here for answer.

Offline

#27 2007-04-14 00:58:24

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,552

Re: Four In A Line Flash Version

Boy oh boy! That is good illustrating. I am glad I took the effort to "free up" 4-in-a-line so we could do all this.

OK, I will make a 3-col version and let you know when I am done.

Now ... how are we getting on with 5-in-a-line ... ?

And who wants a 3D version?


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#28 2007-04-14 01:16:26

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: Four In A Line Flash Version

I’ve never seen a 3D version before (not even a real-world toy-game version) so yes! I’d be most curious to see what a 3D version would be like! tongue


Q: Who wrote the novels Mrs Dalloway and To the Lighthouse?

A: Click here for answer.

Offline

#29 2007-04-14 23:48:45

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,552

Re: Four In A Line Flash Version

Well, first things first, I found it easiest to just replace the three-in-a-line with a new version that has only 3 columns. See what you make of it. (Three In A Line)

(I can make a separate page with the four-column version if you want)


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#30 2007-04-15 01:54:13

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: Four In A Line Flash Version

You know something? I’ve just realized that when a column is full, you can pass a turn by trying clicking on that column! eek

You can’t pass when no column is full, only when one is full.


Q: Who wrote the novels Mrs Dalloway and To the Lighthouse?

A: Click here for answer.

Offline

#31 2007-04-15 04:21:27

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Four In A Line Flash Version

I've got an idea that might make this game quite nifty.

How about a variation where whenever the bottom 4 rows get completely filled, the board 'sinks' a bit, getting rid of the bottom row.
The bottom row wouldn't have been able to make any lines anyway, and this way it means that the game can't end in a draw.


Why did the vector cross the road?
It wanted to be normal.

Offline

#32 2007-04-15 05:05:13

Devantè
Real Member
Registered: 2006-07-14
Posts: 6,400

Re: Four In A Line Flash Version

The computer will go for a set method after a couple of turns. Which makes it rather easy to beat. tongue

You're turning this into DX Ball, mathsyperson. tongue

Offline

#33 2007-04-15 15:19:33

U7109
Real Member
Registered: 2007-03-19
Posts: 485

Re: Four In A Line Flash Version

MathsIsFun wrote:

I have spent Easter taking the current Javascript Version of Four In A Line and developing this New Flash version of Four In A Line

Play with it ... see if you like it, tell me if it misbehaves.

(I might make a 3D version!)

Are you going to upgrade the current 4-In-A-Row on the games section?


"Reality leaves a lot to the imagination," ~ John Lennon

Offline

#34 2007-04-15 17:53:12

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,552

Re: Four In A Line Flash Version

Jane: don't you deserve to miss a turn if you do? smile (I will investigate)

Mathsy: interesting variation. "Tetris-In-A-Line". And yes, no draws!!

Choco: if the flash version appears to be better, I will!

I am going to have so many variations, I will need an index page "Mad about In-A-Line" ... !


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#35 2007-04-15 21:17:00

espeon
Real Member
Registered: 2006-02-05
Posts: 2,586

Re: Four In A Line Flash Version

Zhylliolom wrote:
Zhylliolom wrote:

This shouldn't be an issue if you play the game normally, but if you click "new game" when a piece is falling sometimes it will freeze in the slot it is in and float in midair. When you try to put a piece in that column the next game your piece will go where that old one is hovering. I've only gotten it to do this a couple times though, it doesn't happen every single time. You can use this bug to give the computer an extra turn at the start, but it doesn't really make the game harder.

I just used this... clicked new game at a special time while the computer's piece was falling.

Thats what I said!


Presenting the Prinny dance.
Take this dood! Huh doood!!! HUH DOOOOD!?!? DOOD HUH!!!!!! DOOOOOOOOOOOOOOOOOOOOOOOOOD!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Offline

#36 2007-04-15 22:15:10

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: Four In A Line Flash Version

MathsIsFun wrote:

Jane: don't you deserve to miss a turn if you do? smile (I will investigate)

Well, the computer won’t pass unless all columns are full (when it will then declare the game a draw). smile

I thought it would be like chess, where passing is not allowed – which sometimes leads to the scenario of zugzwang: a player in trouble is forced to make a move simply because it’s their turn to move, even though making any sort of move would make their already bad position even worse.


Q: Who wrote the novels Mrs Dalloway and To the Lighthouse?

A: Click here for answer.

Offline

#37 2007-04-15 22:46:37

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,552

Re: Four In A Line Flash Version

Of course ... passing can help in some cases. Must disallow!


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#38 2007-04-19 14:42:58

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,578

Re: Four In A Line Flash Version

MIF, I beat your computer on difficult/hard for the 6x7 4 in a row game (connect four).
Do you log the history of the games so you can replay them for your own amusement later??
Or for others to see what others have played, when they win?
Like, let's say Zillion or MIF win a game at a certain level of difficulty, then maybe another
user could choose to replay that game by choosing it from a "memorable" games list??


igloo myrtilles fourmis

Offline

#39 2007-04-19 15:15:30

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,552

Re: Four In A Line Flash Version

Good idea, John! Must be possible to do.

Update: I am still working on a 3D version. 3D is hard! Not only do I have to write the code for it, but I need to be able to SHOW it so that you can see what you are doing ... have been working on this for days.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#40 2007-04-19 19:42:38

U7109
Real Member
Registered: 2007-03-19
Posts: 485

Re: Four In A Line Flash Version

MathsIsFun, do you mean when you say, 'Working on it for days' with the sitting at the computer in any time you can get? 'cause that's what I think it is.

Back on topic, I'd love to see a 4D version of Tic Tac Toe! But I'm not asking MathsIsFun to actually make it just yet.


"Reality leaves a lot to the imagination," ~ John Lennon

Offline

#41 2007-04-20 00:33:42

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Four In A Line Flash Version

If it's easier, you could just make it do lots of different grids which each represent a different layer, rather than trying to do some funky 3D graphics. If you do ever expand it into 4D, you'll have to start doing that anyway.

If the game-saving is ever implemented, I think it would be a good idea to include a popup or something which asks you whether you want your game saved, rather than just doing it automatically. I wouldn't want everyone being able to see my stupid mistakes. tongue


Why did the vector cross the road?
It wanted to be normal.

Offline

#42 2007-04-20 18:33:10

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,552

Re: Four In A Line Flash Version

Well, this is what I managed to achieve: Connect 3D

I actually started to enjoy playing the computer. Rotating the board really helps to see what is going on, too. As usual, report any bugs, ideas, etc.

Choco: yes, about a weeks worth of part-time work.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#43 2007-04-20 18:35:51

U7109
Real Member
Registered: 2007-03-19
Posts: 485

Re: Four In A Line Flash Version

I just started playing that game. Yowza.

The graphics are totally cool, and as I said, could you make a 4D version?


"Reality leaves a lot to the imagination," ~ John Lennon

Offline

#44 2007-04-20 19:40:30

Devantè
Real Member
Registered: 2006-07-14
Posts: 6,400

Re: Four In A Line Flash Version

That's pretty cool. smile

Trouble is, I don't think my PC can handle it. It can still play, but incredibly slowly.

Offline

#45 2007-04-20 20:19:11

justlookingforthemoment
Moderator
Registered: 2005-05-26
Posts: 2,161

Re: Four In A Line Flash Version

Wow, that's excellent, Rod.

A way to pass: once a stack of four-high has been made, if you click there as your turn, no counter is placed and you miss your go.

A thought: sometimes it is a little hard to identify four in a row diagonally, as the counters are circular. Maybe counters should be blocks or cubes?

Offline

#46 2007-04-21 11:38:59

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Four In A Line Flash Version

I think the slowness is probably just because it's in development rather than because your computer is slow, Devanté. For me, the computer considers all 16 moves, taking maybe half a second for each, and then puts its counter in the place that it likes best.

Very nice though, apart from the speed. I didn't have any problems seeing what counters were where (although I was confused for a few seconds about how placement is indicated by shadows) and the only reason I lost is because the computer managed to outwit me. I need to get practising. smile


Why did the vector cross the road?
It wanted to be normal.

Offline

#47 2007-04-22 14:26:16

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,552

Re: Four In A Line Flash Version

mathsyperson wrote:

I think the slowness is probably just because it's in development rather than because your computer is slow...

I wish it were so. Flash runs 100 times slower than Java, but it wins out because is more commonly installed on PCs, and it loads up a LOT faster (ever noticed how Java apps sit there for ages loading? That often means people go away).

In the 3D version it has about 70 possible "lines" to consider, and it has to try multiple possible moves.

The only speed up I have managed is to "exclude" lines that have no pieces on them ... you will find it is very fast at the beginning now, and slows down as the game gets more complex. Best I can do.

I have put a little "Time=" at the bottom of the game ... what speeds do you get in the middle of a game now?


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#48 2007-04-22 15:28:43

Zhylliolom
Real Member
Registered: 2005-09-05
Posts: 412

Re: Four In A Line Flash Version

In the middle of the game Time ≈ 5000 for me.

Offline

#49 2007-04-29 22:11:50

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,552

Re: Four In A Line Flash Version

mathsyperson wrote:

How about a variation where whenever the bottom 4 rows get completely filled, the board 'sinks' a bit, getting rid of the bottom row.

I have worked on this and have nearly finished a version where the board "sinks" whenever the bottom row is filled. (Not the bottom 4)

However I don't have a name for it, so can't make a page!

4-in-a-line-sinker? 4-in-a-line-descent? Descent-in-a-line? Connect-Sink? Surely there must be a good name.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#50 2007-04-30 00:50:53

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Four In A Line Flash Version

Hmm, that would make for some interesting strategies. I suggested when the first 4 lines were full just so that it wouldn't affect any half-made lines, but now that it does, it changes the game more significantly. Now completing a row is a new way of blocking.

I can't think of any good names though. sad


Why did the vector cross the road?
It wanted to be normal.

Offline

Board footer

Powered by FluxBB