POV-Ray : Newsgroups : povray.binaries.images : 2048 game rendered with POVRay : Re: 2048 game rendered with POVRay Server Time
8 Jul 2024 06:46:05 EDT (-0400)
  Re: 2048 game rendered with POVRay  
From: scott
Date: 30 Jul 2014 11:54:30
Message: <53d91536$1@news.povray.org>
> http://en.wikipedia.org/wiki/2048_(video_game)

It's open source, so I can answer my own question, the value of the new 
tile that is randomly generated is chosen thus:

var value = Math.random() < 0.9 ? 2 : 4;

So it's a 90% chance of a 2, 10% chance of a 4. Interesting.

> Looks very good - nice work!
> I'd be interested to see how it was written, and what the AI logic is.
> How does the game determine what direction to slide the tiles?  Generating the
> highest value tile, or combining the most tiles? (I'm leaning toward the latter)

Yes I wondered that too, it looks like the answer lies in the "move" 
function of "game_manager.js", but I don't have time to try and 
understand it right now.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.