Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Tic Tac Toe with dynamic programming

games tic tac toe

  • Please log in to reply
5 replies to this topic

#1 h3121

h3121

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 23 September 2013 - 09:20 PM

haow i can make tic tac toe with dynamic programming??


  • 0

#2 Chall

Chall

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 349 posts
  • Location:Cedar Rapids, IA
  • Programming Language:Java
  • Learning:C, Java, C++, C#, Python, JavaScript, Assembly

Posted 24 September 2013 - 05:25 AM

What do you mean by dynamic?

Almost all programming by it's nature is dynamic, unless you actually go to the length of laying out every possible scenario. Just making a Tic Tac Toe game would be dynamic, unless you actually, for example, made and image for each board combination possible.


  • 0
Speaks fluent Java

#3 fungck

fungck

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 24 September 2013 - 08:49 PM

you cannot take any advantage in a 3X3 tic tac toe with dynamic programming.

Dynamic programming is normally for improve run time for a very large case with some storage
 of information.

for larger board like 1000X1000 tic tac toe, you can save the number of consequence X or O for all 8 direction for every cell, or every cell nonempty and dynamically update them for every change.

 

 


  • 0

#4 h3121

h3121

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 07 October 2013 - 09:10 PM

What do you mean by dynamic?

Almost all programming by it's nature is dynamic, unless you actually go to the length of laying out every possible scenario. Just making a Tic Tac Toe game would be dynamic, unless you actually, for example, made and image for each board combination possible.

I mean dynamic is how the computer can know our steps and use the opportunity to win the game


you cannot take any advantage in a 3X3 tic tac toe with dynamic programming.

Dynamic programming is normally for improve run time for a very large case with some storage
 of information.

for larger board like 1000X1000 tic tac toe, you can save the number of consequence X or O for all 8 direction for every cell, or every cell nonempty and dynamically update them for every change.

i want make board 6x6 in the game 


  • 0

#5 Chall

Chall

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 349 posts
  • Location:Cedar Rapids, IA
  • Programming Language:Java
  • Learning:C, Java, C++, C#, Python, JavaScript, Assembly

Posted 08 October 2013 - 05:27 AM

I mean dynamic is how the computer can know our steps and use the opportunity to win the game


i want make board 6x6 in the game 

What you mean by how can I make a Tic Tac Toe game using dynamic programing is how can I make an AI for a Tic Tac Toe game, then. If that's the case, you should have a look at some of the Tic Tac Toe tutorials. They almost always include a copy of the AI, and there is one for almost every language, here at CodeCall in the tutorial section.


  • 0
Speaks fluent Java

#6 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 08 October 2013 - 08:54 AM

Your biggest problem is that Tic Tac Toe is a solved game. Regardless of how you make the AI work under the hood, the result of a "correct" implementation is going to be the same.The entire game is determined within the first two-three moves.

 

Also, because of how simple Tic-Tac-Toe is, it isn't particularly amenable to Dynamic Programming (https://en.wikipedia...mic_programming ) because there aren't subproblems to break it down into.


  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/






Also tagged with one or more of these keywords: games, tic tac toe

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download