Code Monkey home page Code Monkey logo

ai4u's People

Contributors

nadirizr avatar

Watchers

 avatar

ai4u's Issues

Player is not switched from turn to turn in TicTacToe

What steps will reproduce the problem?
1. launch the game
2. make a move

What is the expected output? What do you see instead?
second move is played by X again, instead of O.


Original issue reported on code.google.com by igal1987 on 13 Jun 2009 at 10:26

Fix Minimax

The Minimax implementation only contains a one level implementation.
Extend it to get a depth threshold. 

Original issue reported on code.google.com by igal1987 on 10 Mar 2010 at 12:00

Is the For Loop in RandomUtils.pickRandom Necessary?

I was looking at the code, and got a bit perplexed. The goal of the method 
is to return a random value from a given collection. It could all be summed 
in a line reading:

return collection[nextInt(collection.size())];

Or in more lines, if iterators are used. But the loop was there in between 
the really necessary lines of code. It seemed to me then that the entire 
purpose of the loop is to add randomness to the method, but it does so in a 
confusing manner. Since it is very unclear from reading the loop how long 
it will run.
When I tried to calculate the amount of steps of the loop they seemed to me 
random by themselves. The chance that the loop will stop at the next step 
is bigger from the previous by a constant factor.

My point is that if the entire purpose of the loop is to add more 
randomness to the method, why not create a simpler one or skip it 
altogether as is done in the other pickRandom method?

Original issue reported on code.google.com by [email protected] on 16 Feb 2009 at 10:11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.