Tic tac toe - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Tic tac toe

generalengeneralen Posts: 68Member
Hi!

Someone of you out there who have a tic tac toe game, human vs. computer only. Im completely new to VB, so an easy one please =)! Or where I can find one..cant find a easy one =(


Thanks

Comments

  • BitByBit_ThorBitByBit_Thor Posts: 2,444Member
    : Hi!
    :
    : Someone of you out there who have a tic tac toe game, human vs. computer only. Im completely new to VB, so an easy one please =)! Or where I can find one..cant find a easy one =(
    :
    :
    : Thanks
    :

    Looking for examples? Search Google.com

    Greets...
    Richard

  • jedieclipsejedieclipse Posts: 4Member
    : : Hi!
    : :
    : : Someone of you out there who have a tic tac toe game, human vs. computer only. Im completely new to VB, so an easy one please =)! Or where I can find one..cant find a easy one =(
    : :
    : :
    : : Thanks
    : :
    :
    : Looking for examples? Search Google.com
    :
    : Greets...
    : Richard
    :
    :
    I have an example if you want it, but its human vs. human, its actually very simple. if you want the computer to do it well sad to say it will not be easy.

    J.Eclipse

  • mami0385mami0385 Posts: 1Member
    i have made a computer vs human tic tac toe game but u have to use a series of loops, you can use the select case structure with if thens also
    : : Hi!
    : :
    : : Someone of you out there who have a tic tac toe game, human vs. computer only. Im completely new to VB, so an easy one please =)! Or where I can find one..cant find a easy one =(
    : :
    : :
    : : Thanks
    : :
    :
    : Looking for examples? Search Google.com
    :
    : Greets...
    : Richard
    :
    :

  • BitByBit_ThorBitByBit_Thor Posts: 2,444Member
    [b][red]This message was edited by BitByBit_Thor at 2005-5-4 13:11:59[/red][/b][hr]
    I read a trick once:

    For a computer AI make pairs of 15!

    What?! I'll explain:

    Here's the value per field
    [code]
    6 1 8
    7 5 3
    2 9 4
    [/code]
    In any tic tac toe, the value of the three fields has to be 15 to win.
    Now make the computer get values of 15 and prevent the opponent from obtaining 15.
    This is the basis for a simple and very effective AI-script. To get an unbeatable opponent, you'll need to examine every value the computer can take (every field) and pick the one that prevents the most 15's.

    Play a tic tac toe game with yourself and keep this field above with you. Write your moves down in the form of numbers and if you made the right decisions, there should every time be a prevention of the number 15!

    Greets...
    Richard
Sign In or Register to comment.