<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Can you beat my Neural Network at Blackjack?</title>
		<link>http://www.allegro.cc/forums/view/357986</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 08 May 2004 08:02:31 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, since I never post anything meaningful, I thought I&#39;d show you guys something I made for my final project in Neural Networks at my final year of college. (Keep in mind I hate college, and carry no huge amount of pride in this project.)</p><p>Anyways, the basic premise is this. You play blackjack versus a dealer (or optionally, you can watch 2 neural networks duke it out versus the dealer) with a set rule. The dealer will hit if he has less than 17, and stand if he has more than 17, and more than or equal to your total. Player 1 is a reinforcement learning neural network(buzzword!!) that has been trained 10,000 iterations before the game even starts. You play as player 2 and try to keep up.</p><p>Knowing the odds of the game of blackjack, this came out pretty interesting really. Maybe its boring to you guys, I mean...its just blackjack.</p><p>Oh, and yes, I hand made all the cards...the Queen card has my face on it, and the King card has my partners face on it.</p><p>Download here: <a href="http://www.zerolust.com/flecko/files/Final%20Project.zip"> Blackjack</a></p><p>Screenshot: http://www.zerolust.com/flecko/files/blackjack.png</p><p>And YESSS...the source is included. As well as our presentation slides...if you&#39;re interested. Anywho, let me know what you guys think of it.</p><p>Lastly, no whining abut the download size, the fact that I didn&#39;t use packfiles, or that I included the allegro dll. Its 880k, suck it up.</p><p>And thanks everyone for keeping the allegro community alive, I love this place.<br />-Flecko
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Flecko)</author>
		<pubDate>Fri, 07 May 2004 05:40:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>there were a whole bunch of programming errors in it, things like passing NULL instead of 0 for player.hit(), and things like this:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">for</span> <span class="k2">(</span> <span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> <span class="n">2</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span> <span class="k2">)</span><span class="k2">{</span>
...
<span class="k2">}</span>
<span class="k1">for</span> <span class="k2">(</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> <span class="n">3</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span> <span class="k2">)</span><span class="k2">{</span>
<span class="k2">}</span>
</pre></div></div><p>
you only declared i in the first for loop, not the second. For some reason, I have seen a bunch of people doing that. Are you using MSVC? It obviously produces terrible coding practices..</p><p>The most notable hack I had to perform was changing
</p><div class="source-code snippet"><div class="inner"><pre>temp<span class="k3">=</span><span class="k2">(</span><span class="k1">int</span><span class="k2">)</span> <span class="n">52</span> <span class="k3">*</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span> <span class="k3">/</span> <span class="k2">(</span>RAND_MAX <span class="k3">+</span> <span class="n">1</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
to this<br /><span class="source-code">temp <span class="k3">=</span> <span class="k2">(</span><span class="k1">int</span><span class="k2">)</span><span class="k2">(</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span> % <span class="n">52</span> <span class="k2">)</span><span class="k2">;</span></span><br />rand() returns an integer, you dont have to divide it by RAND_MAX or multiply by 52.</p><p>[edit]one more important hack, this code
</p><div class="source-code snippet"><div class="inner"><pre>deck <span class="k3">=</span> <span class="k1">new</span> <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k3">*</span><span class="k2">[</span><span class="n">13</span><span class="k2">]</span><span class="k2">;</span>
<span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span><span class="n">14</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
</pre></div></div><p> needs to be
</p><div class="source-code snippet"><div class="inner"><pre>deck <span class="k3">=</span> <span class="k1">new</span> <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k3">*</span><span class="k2">[</span><span class="n">13</span><span class="k2">]</span><span class="k2">;</span>
<span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span><span class="n">13</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
</pre></div></div><p>


After alot of hacking, I eventually got it to run but it locked up after one game. I got tired of debugging so Im not going to try to complete an entire game. </p><p>What exactly do you need a &quot;neural network&quot; for? Doesnt the AI just consist of hitting under 17 and staying over 17?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (kazzmir)</author>
		<pubDate>Fri, 07 May 2004 06:20:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><img src="http://www.allegro.cc/forums/smileys/angry.gif" alt="&gt;:(" /></p><p>Man, i&#39;m sorry it didn&#39;t run well kazzmir. I normally use Dev-cpp for my stuff...so I&#39;m more ANSI compatible, but my partner used msvc for all his NN code (I did the allegro stuff) and he did use some rather sloppy-ish code that led to hours of debugging on my part.</p><p>So I take it you&#39;re running under linux and can&#39;t get it to run?</p><p>My linux partition was recently <b>hacked</b> (thats what I get for running an old kernel) so I was planning on building/testing it this weekend.</p><p>Is there anyone who is running winows and can just test the included exe?</p><p>Don&#39;t worry, I haven&#39;t forgotenn our gcc* bretheren, I just have a boatload of finals to take tomorrow.<br />Rock on,<br />-Flecko
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Flecko)</author>
		<pubDate>Fri, 07 May 2004 06:28:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Are you saying you have a backprop network trained to hit below 17? That doesn&#39;t sound too great... If it had leared its own threshold, then yeah, it would be a lot better. Anyways, I have too much homework to test that just now, sorry <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Fri, 07 May 2004 08:26:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="source-code snippet"><div class="inner"><pre><span class="k1">for</span> <span class="k2">(</span><span class="k1">int</span> i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> <span class="n">10</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span> <span class="k2">{</span> ... <span class="k2">}</span>
<span class="k1">for</span> <span class="k2">(</span>i <span class="k3">=</span> ...
</pre></div></div><p>
is not a &quot;terrible coding practice&quot;. It is legacy from the days before C++ was standardised. And yes, MSVC 6 accepts that code and rejects the &#39;correct&#39; alternative.</p><p>If you use MSVC 6, or you think your users might, you can get around it with
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#define for if (0) ; else for</span>
</pre></div></div><p>

Maybe the neural network also gauges what risk to take according to the other player&#39;s situation. I don&#39;t know the rules. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>&quot;19.&quot; &quot;Hit me.&quot; &quot;20.&quot; &quot;Hit me.&quot; &quot;21.&quot; &quot;Hit me.&quot; &quot;22.&quot;</p><p>&quot;D&#39;oh!&quot;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bruce Perry)</author>
		<pubDate>Fri, 07 May 2004 14:32:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>A simplified Blackjack dealer. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><div class="source-code snippet"><div class="inner"><pre><span class="p">#define dealer_limit      17</span>
<span class="p">#define dealer_variance       2</span>

<span class="k1">if</span> <span class="k2">(</span>dealer_variance<span class="k2">)</span>
  dealer_current_limit<span class="k3">=</span>dealer_limit<span class="k3">+</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_637.html" target="_blank">rand</a><span class="k2">(</span><span class="k2">)</span>%<span class="k2">(</span>dealer_risk<span class="k3">*</span><span class="n">2</span><span class="k2">)</span><span class="k2">)</span><span class="k3">-</span>dealer_risk<span class="k2">;</span>
<span class="k1">else</span> dealer_current_limit<span class="k3">=</span>dealer_limit<span class="k2">;</span>

<span class="k1">if</span> <span class="k2">(</span>player_hand&gt;dealer_hand<span class="k2">)</span> dealer_hit<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="k1">else</span> <span class="k1">if</span> <span class="k2">(</span>dealer_hand<span class="k3">&lt;</span><span class="k3">=</span>dealer_current_limit<span class="k2">)</span> dealer_hit<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="k1">else</span> dealer_pass<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Inphernic)</author>
		<pubDate>Fri, 07 May 2004 16:56:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
for ( int i = 0; i &lt; 2; i++ ){<br />...<br />}<br />for ( i = 0; i &lt; 3; i++ ){<br />}
</p></div></div><p>


There is nothing wrong with this. Since in C++ you can declare variables anywhere (doesn&#39;t have to be the first statements in a function). If you declare it again in the second for you get an error. It&#39;s really not a big deal.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Rick)</author>
		<pubDate>Fri, 07 May 2004 18:30:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>No, if it&#39;s in the for loop, it&#39;s only valid for the for loop. At least in standard C++.</p><p>Variable definitions are only valid for the block they are contained in, it doesn&#39;t matter if the block is a whole function or not. However, this is yet another differnt case, because the definition is somehow mangled into the for loop initialization. That&#39;s why it wasn&#39;t totally clear before the standardization -- you have to define what it is valid for.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mars)</author>
		<pubDate>Fri, 07 May 2004 18:38:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Guys, read his first post. The dealer doesn&#39;t use a neural network, is the other player who uses a neural network for tha AI. And it plays quite well. I played this last night and IIRC the dealer won 18, the NN AI won 36 and I won 38.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Oscar Giner)</author>
		<pubDate>Fri, 07 May 2004 18:39:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>The most notable hack I had to perform was changing<br />temp=(int) 52 * rand() / (RAND_MAX + 1);</p><p>to this<br />temp = (int)( rand() % 52 );</p></div></div><p>
The original was better.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 07 May 2004 22:33:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
No, if it&#39;s in the for loop, it&#39;s only valid for the for loop.
</p></div></div><p>

A block is noted by { }, and since the initialization isn&#39;t inside the for loops { }, it&#39;s not part of the for loop.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Rick)</author>
		<pubDate>Fri, 07 May 2004 22:41:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Nope, the standard says that the variable declared there is only available inside the loop. gcc does that correctly, MSVC6 doesn&#39;t.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Oscar Giner)</author>
		<pubDate>Fri, 07 May 2004 22:46:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>temp=(int) 52 * rand() / (RAND_MAX + 1);</p></div></div><p>
Doesn&#39;t it assume that RAND_MAX*52 fits in int range? It doesn&#39;t have to work if it&#39;s not true although idea is better than % operator.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>Nope, the standard says that the variable declared there is only available inside the loop. gcc does that correctly, MSVC6 doesn&#39;t.</p></div></div><p>
And this code is perfectly fine: <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span><span class="n">10</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
  <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span><span class="n">10</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
    <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span><span class="n">10</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
      <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span><span class="n">10</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
        <span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span><span class="n">10</span><span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
          do_something_100000_times<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>things like passing NULL instead of 0 for player.hit()</p></div></div><p>
This is fine for me. I know that you are supposed to use 0 in C++, but NULL is much more readable and it would be really surprising if NULL wasn&#39;t defined as 0. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Fri, 07 May 2004 23:48:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>So since I use MSVC and do this the wrong way, will someone who tries to compile it using another get an error?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Rick)</author>
		<pubDate>Fri, 07 May 2004 23:55:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
And this code is perfectly fine: 
</p></div></div><p>
yup, the problem comes when you do this:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">for</span> <span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span> i<span class="k3">&lt;</span><span class="n">10</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
    do_something<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>

<span class="k1">for</span> <span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span> i<span class="k3">&lt;</span><span class="n">10</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
    do_something<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
it should compile, but it doesn&#39;t with MSVC6.</p><p>Problem is, if you try this:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">for</span> <span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span> i<span class="k3">&lt;</span><span class="n">10</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
    do_something<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>

<span class="k1">for</span> <span class="k2">(</span>i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span> i<span class="k3">&lt;</span><span class="n">10</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
    do_something<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
Now it won&#39;t compile with mingw:
</p><div class="source-code snippet"><div class="inner"><pre> name lookup of `i<span class="s">' changed for new ISO `for'</span> scoping
   <span class="k1">using</span> obsolete binding at `i<span class="s">'</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Oscar Giner)</author>
		<pubDate>Fri, 07 May 2004 23:57:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>sucks to be whoever tries to compile my programs not using MSVC6 <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Rick)</author>
		<pubDate>Fri, 07 May 2004 23:59:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It seems that best solution is to just use:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span> i<span class="k2">;</span>

<span class="k1">for</span> <span class="k2">(</span>i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span> i<span class="k3">&lt;</span><span class="n">10</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
    do_something<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>

<span class="k1">for</span> <span class="k2">(</span>i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span> i<span class="k3">&lt;</span><span class="n">10</span><span class="k2">;</span> i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
    do_something<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
<img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Krzysztof Kluczek)</author>
		<pubDate>Sat, 08 May 2004 00:07:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, that&#39;s what I always do <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Oscar Giner)</author>
		<pubDate>Sat, 08 May 2004 00:09:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Or, having read the thread like good little boys, you would have seen the<span class="source-code"><span class="p">#define for if(0); else for</span></span>, Which causes the variable to be in it&#39;s own scope.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 08 May 2004 00:49:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What&#39;s wrong with my suggestion? Namely
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#define for if (0) ; else for</span>
</pre></div></div><p>

Guys, stop flaming MSVC6. I assume it was released before the relevant C++ standard.</p><p>[EDIT]<br />CGames, have a &#9733; <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><br />(Poll: who can see that character? It&#39;s supposed to be a star. I see it in Mozilla but not in Konqueror.)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bruce Perry)</author>
		<pubDate>Sat, 08 May 2004 00:52:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
And this code is perfectly fine: </p><p>for(int i=0;i&lt;10;i++)<br />  for(int i=0;i&lt;10;i++)<br />    for(int i=0;i&lt;10;i++)<br />      for(int i=0;i&lt;10;i++)<br />        for(int i=0;i&lt;10;i++)<br />          do_something_100000_times();
</p></div></div><p>
That wouldn&#39;t kill MSVC6 because each one is in the next scope, right?</p><p>What I&#39;m seeing is MSVC6 doing this:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k2">{</span>
<span class="c">/*scopeA*/</span>

<span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> x, ...<span class="k2">)</span> <span class="c">//x is a part of scopeA</span>
<span class="k2">{</span>
<span class="c">/*scopeB*/</span>
<span class="k1">for</span><span class="k2">(</span><span class="k1">int</span> y, ...<span class="k2">)</span><span class="k2">{</span> <span class="c">/*scopeC*/</span><span class="k2">}</span> <span class="c">//y is a part of scopeB</span>
<span class="k2">}</span>

<span class="k2">}</span>
</pre></div></div><p>
Is that correct?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
yup, the problem comes when you do this:</p><p>for (int i=0; i&lt;10; i++)<br />    do_something();</p><p>for (int i=0; i&lt;10; i++)<br />    do_something();</p><p>it should compile, but it doesn&#39;t with MSVC6.
</p></div></div><p>
Well... true. Unless if you apply the patches that have been around for years. In which case, MSVC6 works fine with the exception of C99 support (which it never had to begin with). Unless I&#39;m forgetting something.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Chris Katko)</author>
		<pubDate>Sat, 08 May 2004 00:58:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Patches? News to me. Even less excuse for people to flame Microsoft! <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>Boy will I be unpopular.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bruce Perry)</author>
		<pubDate>Sat, 08 May 2004 00:59:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Its still way out of date. And is likely out of MSs support phase.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 08 May 2004 01:00:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp6/default.aspx">eh?</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Chris Katko)</author>
		<pubDate>Sat, 08 May 2004 01:06:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Well... true. Unless if you apply the patches that have been around for years. In which case, MSVC6 works fine with the exception of C99 support
</p></div></div><p>
Ah, the patches solve that? I know it fails with an unpatched MSVC, but I never tried it again, when I updated.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Oscar Giner)</author>
		<pubDate>Sat, 08 May 2004 01:09:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Chris: When was that released?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 08 May 2004 01:11:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thomas, they already have released 5 or 6 patches. I&#39;d say more than a year since the last one.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Oscar Giner)</author>
		<pubDate>Sat, 08 May 2004 01:14:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>And now that MSVC.NET has been released, they&#39;ll probably not release much of anything for MSVC6, just like with what they do for windows itself. 95 is out of support, and 98 is on the way out.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 08 May 2004 01:17:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Etwinox: That is how MSVC handles it, and that is the wrong way to handle it <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 08 May 2004 06:34:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m sorry for the &quot;MSVC 6&quot; only code.</p><p>I don&#39;t wanna play the blame game here, but my partner did alot of the coding with &quot;tricky&quot; stuff like you&#39;re all seeing.</p><p>I plan on cleaning it all up and have it be able to compile under linux/gcc and windows/dev-cpp.</p><p>And just so everyone knows, the dealer uses a flat rule, and the players use a reinforcement rule NN that is trained to 10,000 iterations before the game starts.</p><p>Thats all, I&#39;m glad that its generating this much talk...although I wish less of the talk was on the poor code <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /><br />-Flecko
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Flecko)</author>
		<pubDate>Sat, 08 May 2004 08:02:31 +0000</pubDate>
	</item>
</rss>
