Jump to content
  • entries
    53
  • comments
    536
  • views
    68,404

Four-Play with better AI


Guest

560 views

Here is the latest version of my four-in-a-row game. It is a challenge to win, but I'm able to do it from time to time. Usually the wait between moves is less than 20 seconds, and the longest time I measured was about 35.I am curious how people feel about the difficultly level now. I hope Thomas has some time to try it out, since he consistently won against an earlier release.Some other new features include a screen that starts out white and fades to black while the Atari is thinking. This gives you an idea how quickly it is planning. Also you can choose between playing red or blue now. To play blue, press fire before your first move. In fact, you can press fire during any of your moves to switch sides. Consequentially you can use the fire button to watch the Atari play against itself.Known issues include an unstable scanline count when the programs returns to the board after thinking, and strange behavior when the game is about to end in a draw.Have Fun!

6 Comments


Recommended Comments

Pretty tough AI, though I only played one game with blue (won :|).

 

IMO you should change the "thinking" color into the computer color (red or blue). Then you need some difficulty settings. Some people might find the maximum difficulty to strong.

 

I noticed, that the game thinks longer at the start and shorter towards the end. Maybe you can equalize the times somehow, either by a timer, by increasing/decreasing the depth or by adding some heuristics, especially when the game starts.

 

BTW: Sometimes the game display 265 instead of 262 scanlines.

Link to comment

I think you have now achieved the right balance between thinking time and difficulty. The game is still very difficult, and has managed to beat me on every attempt so far, but I will get there yet! There is clearly a degree of randomness involved now, as the game will play different moves with the same board configuration! This will be a great game once the graphical glitches have been solved. As Thomas noted already, it would be good to have a variable skill level. Perhaps the player could work through from beginner to advanced levels, with different board colours and scoring for each level?

 

Chris

Link to comment

One more thing I noticed:

When I have 3 in a row, the game still thinks as long as always. This gives the AI some "dumb" touch, because a human player would react pretty immediately. Either he/she blocks the 4th piece or he wins the game by making 4 in a row him/herself.

 

I suppose this situation should automatically result in a shorter thinking time, using the algorithm you use. So maybe there is still room for improvement or a bug inside.

 

BTW: 3:0 for me! :|

Link to comment

One more thing:

IMO the graphics look a bit vertically compressed. And since you only use 180 rows yet, it should be easy to increase the vertical size of the pieces by 1.

Link to comment

Thanks for the comments. Different levels were always part of the plan. I'm just working on the maximum level now because it's easier to reduce the difficulty than increase it.

 

The game gets faster towards the end because as columns fill up there are less moves to search. I can work on speeding up the searches at the beginning, but the endgame will always be faster.

 

It's true that the game takes just as long when there is an immediate three-piece threat. That's because the search is depth-first. It searches in a particular order, and unless your threat is in the first column it searches, it will analyze other columns many moves ahead before it gets there. It's not a bug; it just means I'll need to adjust the search pattern to spot threats sooner.

 

Thanks for the suggestions regarding graphics. I'll get to that when I'm satisfied with the AI.

 

Wow, 3:0, Thomas? Have you studied strategy, or are you a natural? :|

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...