bham
I found it easiest to simulate millions of random dart throws parameterized by throw angle and velocity. I record the slot on the board (1-20, Bull) hit given the launch angles and force of the throw. I let this "simulation" run until I had 50 samples per board slot.
The simulation is run once ahead of time. The simulation results are bundled with the app.
When it becomes the AI's turn, it picks a slot to aim at based on the game variation and state of the game. Currently, it chooses rather poorly in Cricket.
Then it picks a random sample from the sample pool recorded from the aforementioned simulation. Based on the user-chosen competence level, it adds a small, random amount of error to the angle and velocity associated with the selected sample. Finally, the dart is launched using the calculated angles and force.
While the app is Objective C, the offline simulation was written in Python. The whole thing was a blast to write.
Here's an old video of gameplay:
Skip ahead to around 1:10 to see the AI take its turn.
There was recently committed writeSync, statSync, etc. that perform POSIX API calls synchronously.
So it is in the past, boring, and in the past and boring. OK.
http://www.cracked.com/video_16019_video-game-pitch-meeting-...
Array.prototype.each
This is not needed. There's .forEach already.As anyone who watches Cash Cab knows, take the money and run.
Chui Chui loves food, and is very fond of sugared squid!
Good to know!
http://images.google.com/images?hl=en&client=firefox-a&#...
Come on in, the water's warm.
Though it just looks like a stub for now.
Also, I read the following here: http://github.com/slact/nginx_http_push_module/issues/unread...
"Meanwhile, you can use your application to do the authenticating, and generate ids for already-authenticated clients from a large enough (> 2^128) keyspace for security."
So, there, I did my homework.
How would you go about restricting access to channels to a specific user or users? My first take would be to issue an unguessable id upon successful authentication and use this id as the channel id -- a shared secret. Only those who should know the id do know it.
I don't see support for streaming; the connection to the long-polling client is closed after consuming. Are you planning on adding support for streaming new messages as they are published?
As my great aunt Ada used to say, "more eyeballs are better than your eyeballs."
I can setup a VPS with nginx proxying to tornado/node.js/etc that does streaming without a problem. However, there's the issue of scaling it out that's pain. You can use Linode's API or something similar but eek, what a mess.
Thoughts?