Need a heuristic for drop four game

Started by
12 comments, last by alex_myrpg 19 years, 2 months ago
Thanks for all of you people for ur concern. Talking about the heuristic I mean we cant ofcource search for the all possible states and we have to stop the tree somewhere so at that point we have to make the evaluation that evaluation funcion i think is heuristic. and as far as i have learned there are 7 cells per row(for jost1billion). well jost you could have been a real help if you can explain this for me with more detail. i actually not getting your idea. and talking to you Trap i know it must have already solved but i am actually new here i dont know how can properly learn from the forums may be you people can help me. but lot of thanks for u people for showing concern.
Advertisement
I think what jost was talking about is detecting a win/lose condition (correct me if i am wrong) which is needed, but to address your 'heuristic' question, you need to run a search on the search space, effictively by getting the A.I. to simulate the next possible moves..A Heuristic is effectively an estimation or guess on the current state of your world, to hopefully lead the A.I. into making the correct move. (e.g. A* heuristic to estimate distance), What i proposed earlier is the Minimax algorithm, which works out really well in situations where the search space gets smaller and eventually may goto 0. (e.g. Tic-Tac-Toe when all squares are filled, Connect4, etc).

A quick search on Connect4 and Minimax gave sent me to the following link

http://thecodeproject.com/netcf/Connect4AB.asp

I wrote a minimax for tic-tac-toe which is a much smaller search space, and easier to implement the minimax search on, give that a shot for a first run, and then upgrade to connect four
-Syn
-Lucas
Quote:Original post by Syntax
I think what jost was talking about is detecting a win/lose condition (correct me if i am wrong) which is needed, but to address your 'heuristic' question, you need to run a search on the search space, effictively by getting the A.I. to simulate the next possible moves..A Heuristic is effectively an estimation or guess on the current state of your world, to hopefully lead the A.I. into making the correct move.


Oh, I see, a heuristic basically means AI. :P Well in that case.. my Connect Four game had completely random AI so I can't help you (I made it that way because that was what was assigned on the project.. maybe I'll write a Connect Four again someday.. but in the meantime I have to work on Stealth Prankster 2, w00t).

Good luck with your Connect Four game, Syed!
Website (with downloads of my games)
Blog (updates on current projects)
Seeds of Time Online has returned!
well i just use the simplest and quicker method possible. always best just to return a high value for a win, and a low value for a lose. also, i'd make it so that the value is slightly higher for a quick win (depth of win) and slighly lower for a quick lose (depth of win). this works very well for me...

This topic is closed to new replies.

Advertisement