<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://blog.lalex.com/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>LAlex devblog v6 - Articles  - Commentaires</title>
  <link>http://blog.lalex.com/</link>
  <description></description>
  <language>fr</language>
  <pubDate>Wed, 23 Jul 2008 19:52:33 +0200</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
    
    <item>
    <title>Traduction : article sur le pathfinding A* - SuperDupont</title>
    <link>http://blog.lalex.com/post/2003/09/15/Traduction-%3A-article-sur-le-pathfinding-A#c2939</link>
    <guid isPermaLink="false">urn:md5:d4dea7b9705fdbabd467d46cefdb33fe</guid>
    <pubDate>Sat, 08 Dec 2007 00:18:26 +0100</pubDate>
    <dc:creator>SuperDupont</dc:creator>
    
    <description>&lt;p&gt;Article super, traduction nickel, j'ai codé l'algo - qui fonctionne - en
deux heures&lt;br /&gt;
Plus qu'a l'optimisé et la je crois qu'il va me falloir plus de deux
heures....&lt;br /&gt;
Quelqu'un a des trucs ????&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Traduction : article sur le pathfinding A* - Daemonight</title>
    <link>http://blog.lalex.com/post/2003/09/15/Traduction-%3A-article-sur-le-pathfinding-A#c2877</link>
    <guid isPermaLink="false">urn:md5:8aa09dedf0d0ec2a198ec6728c7922b7</guid>
    <pubDate>Wed, 13 Jun 2007 09:51:22 +0200</pubDate>
    <dc:creator>Daemonight</dc:creator>
    
    <description>&lt;p&gt;bloody -&amp;gt; pour répondre à ta question, oui, tu peux faire l'étape c avant
l'étape a et b.... puisque que de toute façon tu fait ces 3 étapes en boucle
!&lt;br /&gt;
Finalement, faire &amp;quot;a-b-c-a-b-c-a-b-c&amp;quot; ou &amp;quot;c-a-b-c-a-b-c-a-b-c&amp;quot;, la seule chose
qui change c'est par quoi tu commences.&lt;br /&gt;
Dans l'absolu, pour pouvoir faire l'étape &amp;quot;a&amp;quot;, il faut forcément que la liste
ouverte soit mise à jour, donc...&lt;br /&gt;
_Que l'étape &amp;quot;c&amp;quot; ai été réalisée (on y est !)&lt;br /&gt;
_ou... que l'on soit au début de l'algorythme et que la seule case dans la
liste ouverte soit par conséquent le point de départ. Dans ce cas on commence
par l'étape &amp;quot;a&amp;quot;.&lt;/p&gt;
&lt;p&gt;Tout est donc une question de relativité. L'important est bien faire les
étapes dans l'ordre, et comme c'est une boucle, peu importe l'endroit d'où tu
commences ^^&lt;/p&gt;
&lt;p&gt;Bon matlab (j'en ai fait un peu dans mes études, je trouvais ça
horrible...)&lt;/p&gt;
&lt;p&gt;++&lt;br /&gt;
Daemonight, pour vous servir&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Flash MX 2004 : d'ActionsScript 1 à ActionScript 2 - NiKo</title>
    <link>http://blog.lalex.com/post/2003/09/12/Flash-MX-2004-%3A-dActionsScript-1-ActionScript-2#c2867</link>
    <guid isPermaLink="false">urn:md5:7910e95c6699093bc480073c83318529</guid>
    <pubDate>Mon, 21 May 2007 12:52:02 +0200</pubDate>
    <dc:creator>NiKo</dc:creator>
    
    <description>&lt;p&gt;Petit intérêt des interfaces supplémentaires, pouvoir tester
l'implémentation sur un objet instancié :&lt;/p&gt;
&lt;p&gt;var h:Coureur= new Coureur();&lt;br /&gt;
if (h instanceof Humain) {&lt;br /&gt;
trace('Ce coureur est bien humain');&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Sinon bon billet (oui, je laggue à mort.)&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Traduction : article sur le pathfinding A* - bloody</title>
    <link>http://blog.lalex.com/post/2003/09/15/Traduction-%3A-article-sur-le-pathfinding-A#c2860</link>
    <guid isPermaLink="false">urn:md5:ab367f62d5c26cd2a0a12f94e9397204</guid>
    <pubDate>Fri, 18 May 2007 22:06:37 +0200</pubDate>
    <dc:creator>bloody</dc:creator>
    
    <description>&lt;p&gt;je dois implementer A* avec matlab&lt;br /&gt;
sachant que le point de depart est toujours le meme et que je peux donc le
mettre avant la boucle dans la liste ouverte&lt;br /&gt;
je me demandais si par raison de commodite, on peut faire l etape a et b apres
la c.&lt;br /&gt;
Cela change le fonctionement de l algo?&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Traduction : article sur le pathfinding A* - Duke</title>
    <link>http://blog.lalex.com/post/2003/09/15/Traduction-%3A-article-sur-le-pathfinding-A#c2685</link>
    <guid isPermaLink="false">urn:md5:87f4ad4a744c658c80cdcc5c0af1ec4c</guid>
    <pubDate>Tue, 06 Mar 2007 00:13:05 +0100</pubDate>
    <dc:creator>Duke</dc:creator>
    
    <description>&lt;p&gt;Je comprend vraiment pas ce qui se passe avec cet algo lorsque l'on tombe
sur un cul de sac, j'essaye de schématiser vite fait un exemple:&lt;br /&gt;
.o. . . . . .M . x . .&lt;br /&gt;
. .M.M.M.M.M. . .&lt;br /&gt;
. . . . . . . . . . . . .&lt;br /&gt;
les M sont en fait des murs, au début donc, si o est le point de départ et x
l'arrivée, il va directement arriver vers la droite, en ayant ajoutée toute les
cases jusqu'a celle immédiatement a gauche du mur qu'il va rencontrer, à la
liste fermée. Une fois qu'il sera là, il va examiner les cases adjacente, n'en
trouver qu'une seule, donc se déplacer a gauche, ensuite il trouvera 2 cases
adjacentes, et celle la plus interessante sera celle immédiatement à droite, il
va donc retourner vers le mur.&lt;br /&gt;
J'ai essayé de poser sur papier et je comprend vraiment pas...&lt;br /&gt;
Si quelqu'un peut me donner une bonne explication je lui en serait très
reconnaissant.&lt;br /&gt;
Merci &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Traduction : article sur le pathfinding A* - Daemonight</title>
    <link>http://blog.lalex.com/post/2003/09/15/Traduction-%3A-article-sur-le-pathfinding-A#c2837</link>
    <guid isPermaLink="false">urn:md5:6214be38be8dc3aa65c951311f470467</guid>
    <pubDate>Mon, 05 Feb 2007 20:57:58 +0100</pubDate>
    <dc:creator>Daemonight</dc:creator>
    
    <description>&lt;p&gt;sorry : errata :&lt;br /&gt;
Il n'y a donc plus aucune case du cul de sac dans la liste &amp;quot;fermé&amp;quot; =&amp;gt; Il n'y
a donc plus aucune case du cul de sac dans la liste OUVERTE (bien sûr lol)&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Traduction : article sur le pathfinding A* - Daemonight</title>
    <link>http://blog.lalex.com/post/2003/09/15/Traduction-%3A-article-sur-le-pathfinding-A#c2836</link>
    <guid isPermaLink="false">urn:md5:0bad6835cb5b8f06863393ea9a5baceb</guid>
    <pubDate>Mon, 05 Feb 2007 20:56:29 +0100</pubDate>
    <dc:creator>Daemonight</dc:creator>
    
    <description>&lt;p&gt;Pour répondre à ta question Duke :&lt;br /&gt;
Comme tu le dis Duke, effectivement, le programme va foncer à droite dans le
cul de sac. Arrivé au bout, que ce passe-t-il ? tous les noeuds du cul de sac
sont dans la liste fermé. Il n'y a donc plus aucune case du cul de sac dans la
liste fermé.&lt;br /&gt;
Donc, en toute logique, la case dont le coût &amp;quot;F&amp;quot; est le plus &amp;quot;faible&amp;quot; est
maintenant celle situé en dessous de ton &amp;quot;o&amp;quot; soit en dessous de la case départ.
L'algorithme va donc repartir de là, et le tour est joué.&lt;br /&gt;
C'est typiquement dans un cas comme celui-ci que l'Astar (A*) trouve ses
limites. Il trouvera la solution, mais il perdra du temps du fait qu'il est
&amp;quot;aimanté&amp;quot; par l'arrivé dans le calcul du H en mode &amp;quot;Manhatan&amp;quot;&lt;br /&gt;
Imagine :&lt;br /&gt;
.............................................&lt;br /&gt;
..MMMMMMMMMMMMMMMM ...&lt;br /&gt;
..O...................................M ...&lt;br /&gt;
MMM...M...M...M...M...M... M ...&lt;br /&gt;
MMM...M...M...M...M...M... M ...&lt;br /&gt;
MMM...M...M...M...M...M... M ...&lt;br /&gt;
MMM...M...M...M...M...M... M ...&lt;br /&gt;
MMMMMMMMMMMMMMMMM X&lt;/p&gt;
&lt;p&gt;Tu vois un peu la galère ? Avant de trouver le chemin qui passe par au
desus, l'algo va faire tous les culs de sac un par un. Vive la perte de temps.
Alors que visuellement, celà saute au yeux.&lt;br /&gt;
C'est précisement pour celà que le titre de l'article est Pathfinding A* : Pour
débutant. C'est parfait pour comprendre le principe d'un pathfinder, mais tu
l'aura compris, toute la subtilité d'un algo efficace réside dans le calcul du
H.&lt;br /&gt;
Voila ^^&lt;/p&gt;
&lt;p&gt;Bon code &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;-)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;
&lt;p&gt;et merci à toi LAlex !&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Traduction : article sur le pathfinding A* - Zamer</title>
    <link>http://blog.lalex.com/post/2003/09/15/Traduction-%3A-article-sur-le-pathfinding-A#c2820</link>
    <guid isPermaLink="false">urn:md5:0dcae0f3b53bffdcc1c2c89c3c78edd8</guid>
    <pubDate>Sat, 27 Jan 2007 19:52:03 +0100</pubDate>
    <dc:creator>Zamer</dc:creator>
    
    <description>&lt;p&gt;Salut, c'est vraiment dommage que cette traduction ait conservé les
nombreuses fautes du document originel.&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Flash MX 2004 : d'ActionsScript 1 à ActionScript 2 - zouzoute</title>
    <link>http://blog.lalex.com/post/2003/09/12/Flash-MX-2004-%3A-dActionsScript-1-ActionScript-2#c2631</link>
    <guid isPermaLink="false">urn:md5:607f3c8097d1a72468be2078ce869dfd</guid>
    <pubDate>Sat, 12 Aug 2006 23:31:17 +0200</pubDate>
    <dc:creator>zouzoute</dc:creator>
    
    <description>&lt;p&gt;merci pour ces explications claires!&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Traduction : article sur le pathfinding A* - Neji</title>
    <link>http://blog.lalex.com/post/2003/09/15/Traduction-%3A-article-sur-le-pathfinding-A#c2505</link>
    <guid isPermaLink="false">urn:md5:192a89e951d2248624238e8b6b265dfb</guid>
    <pubDate>Mon, 24 Apr 2006 15:17:59 +0000</pubDate>
    <dc:creator>Neji</dc:creator>
    
    <description>&lt;p&gt;bon bin fait chier... après avoir constaté que le link sur la trad fr avait disparu,(depuis l'article original de P Lester sur gamedev.net j 'avais commencé à traduire jusqu' à la moitié avant que je ne m' aperçoive que le lien fonctionnait de nouveau...&lt;br /&gt;=&gt; j'ai travaillé pour rien !!! &lt;br /&gt;enfin j'y ai pris du plaisir quand même &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;p&gt;Bonne trad Lalex, j' aurais difficilement pu faire mieux.&lt;br /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Traduction : article sur le pathfinding A* - AlBrad0</title>
    <link>http://blog.lalex.com/post/2003/09/15/Traduction-%3A-article-sur-le-pathfinding-A#c2492</link>
    <guid isPermaLink="false">urn:md5:d0a094e9e0179b9d13dacab780a3e20b</guid>
    <pubDate>Thu, 30 Mar 2006 23:43:10 +0000</pubDate>
    <dc:creator>AlBrad0</dc:creator>
    
    <description>&lt;p&gt;Trés bon article, trés claire et surtout en français ce qui est rare sur le pathfinding&lt;br /&gt;Merci ...&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Flash MX 2004 : d'ActionsScript 1 à ActionScript 2 - david</title>
    <link>http://blog.lalex.com/post/2003/09/12/Flash-MX-2004-%3A-dActionsScript-1-ActionScript-2#c2489</link>
    <guid isPermaLink="false">urn:md5:f07e9906f94d947ccf456aea714c6b13</guid>
    <pubDate>Wed, 29 Mar 2006 13:02:52 +0000</pubDate>
    <dc:creator>david</dc:creator>
    
    <description>&lt;p&gt;bonjour et merci pour ce récapitulatif&lt;/p&gt;&lt;p&gt;Simplement j'ai une question à te poser concernant l'ajout de méthode en AS2. &lt;br /&gt;Avant toute chose je suis novice en POO. :o))&lt;br /&gt;Tu dis qu'il faut faire de l'héritage pour ajouter une méthode. Peux tu m'expliquer comment faire si je veux rajouter une méthode a une movieclip. Jusqu'à maintenant je faisait MovieClip.prototype.methode or je ne vois pas comment faire autrement sans passer par un fichier de class qui serait un héritage de movieClip&lt;br /&gt;Merci&lt;br /&gt;J'imagine que cette qustion doit faire sourire mais nous avons tous débuter un jour ;o))&lt;br /&gt;A++ et boone continuation&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Flash MX 2004 : d'ActionsScript 1 à ActionScript 2 - FireStorm</title>
    <link>http://blog.lalex.com/post/2003/09/12/Flash-MX-2004-%3A-dActionsScript-1-ActionScript-2#c2398</link>
    <guid isPermaLink="false">urn:md5:1c199d92de71c1c3b068034035c999ca</guid>
    <pubDate>Mon, 02 Jan 2006 10:22:45 +0000</pubDate>
    <dc:creator>FireStorm</dc:creator>
    
    <description>&lt;p&gt;merci pour cet article bien écrit...&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Erratum article sur le pathfinding A star - dav</title>
    <link>http://blog.lalex.com/post/2004/04/26/Erratum-article-sur-le-pathfinding-A-star#c2326</link>
    <guid isPermaLink="false">urn:md5:1bdf582947a004e997189663822cd208</guid>
    <pubDate>Mon, 31 Oct 2005 11:28:38 +0000</pubDate>
    <dc:creator>dav</dc:creator>
    
    <description>&lt;p&gt;Salut trés interessant tout ca mais j'ai difficulté à comprendre comment le cout d'une case est attribué. D'après les tuto que j'ai lu 10 pour les cases adjacentes et 14 pour les diagonales mais lorsque j'utilise ta classe sans les diagonales il resout le chemin mais le chemin est trés long et trés complexe et lorsque j'utilise les diagonales il ne resout pas le chemin ou en tout cas il y a des trous.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Erratum article sur le pathfinding A star - xion</title>
    <link>http://blog.lalex.com/post/2004/04/26/Erratum-article-sur-le-pathfinding-A-star#c2231</link>
    <guid isPermaLink="false">urn:md5:5f109b96a5d2fbf3d2047444e3912b69</guid>
    <pubDate>Sun, 21 Aug 2005 22:48:13 +0000</pubDate>
    <dc:creator>xion</dc:creator>
    
    <description>&lt;p&gt;tu as raison, je n'avais pas pris en compte le fait que le tri fait revenir en arrière la recherche dès que cela devient moins intéressant (arghk, j'ai fait comment pour passer à côté ? &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_redface.gif&quot; alt=&quot;:$&quot; class=&quot;smiley&quot; /&gt; )...&lt;/p&gt;&lt;p&gt;à noter pour approfondir A* un lien des plus intéressants, mais je suppose que tu l'as déjà dans ta liste sur A* : &lt;a href=&quot;http://theory.stanford.edu/~amitp/GameProgramming/&quot; rel=&quot;nofollow&quot;&gt;http://theory.stanford.edu/~amitp/GameProgramming/&lt;/a&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Erratum article sur le pathfinding A star - LAlex</title>
    <link>http://blog.lalex.com/post/2004/04/26/Erratum-article-sur-le-pathfinding-A-star#c2220</link>
    <guid isPermaLink="false">urn:md5:0e8b8571e398a83049afa6abe1ffa9de</guid>
    <pubDate>Fri, 19 Aug 2005 00:05:18 +0000</pubDate>
    <dc:creator>LAlex</dc:creator>
    
    <description>&lt;p&gt;xion &gt; Je vais regarder de ce côté plus en profondeur alors... &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt; J'avais de toutes façons l'intention de le faire évoluer pour qu'il gère les cases hexagonales, ce sera l'occasion de refaire tous mes tests... &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt; Je développe actuellement une mini-plateforme de test pour du pathfinding justement &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;p&gt;Par contre, tu te trompes sur la situation que tu donnes : en effet, plus le chemin va se rallonger, plus l'estimation de la &quot;valeur&quot; de la case (valeur H) sera importante. Il va donc tester éventuellement de rebrousser chemin s'il se trouve qu'une des cases qui rebroussent chemin devient plus interessante... C'est d'ailleurs là qu'intervient le tri de la liste ouverte... &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;p&gt;L'algo A* est a priori le plus fiable qui existe concernant le fait de trouver le chemin le plus court (enfin &lt;strong&gt;UN&lt;/strong&gt; des chemins les plus courts, i peut y en avoir plusieurs). Son inconvénient se situe au niveau des ressources processeur utilisées, qui peuvent devenir assez importantes... :o&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Erratum article sur le pathfinding A star - xion</title>
    <link>http://blog.lalex.com/post/2004/04/26/Erratum-article-sur-le-pathfinding-A-star#c2219</link>
    <guid isPermaLink="false">urn:md5:12ec5b2ddc43692fe00ddecbc7f200d1</guid>
    <pubDate>Thu, 18 Aug 2005 21:34:35 +0000</pubDate>
    <dc:creator>xion</dc:creator>
    
    <description>&lt;p&gt;Bon, bas j'ai l'impression que ce n'est pas un problème de mon implémentation, donc si jamais tu as des bugs ou autres chemins bizarres, tu pourras toujours chercher sur cette piste &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;p&gt;En tout cas je remarque, et c'est normal en fait, que ce genre de pathfinder trouve LE CHEMIN le plus évident à première vue... cependant, il ne trouve pas LE PLUS COURT CHEMIN.&lt;br /&gt;Il est normal de dire cela tout simplement parce que s'il la boucle passe dans un chemin fermé, mais assez long, tout en allant jusqu'à la sortie alors qu'il suffisait de rebrousser chemin (aller en direction oppopsée à celle où se trouve la case de fin) pour trouver une ligne droite sur un bord ou autre, et bien on trouvera bien un chemin qui marche, mais le pathfinder ne trouvera pas le MEILLEUR. Cependant, pour être certain de trouver le meilleur, on est obligé de tester tous les chemins possibles, donc ta gestion via A* est bien meilleure pour le processeur et trouvera toujours un chemin, malgré que ce ne sera pas forcément le meilleur... &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Erratum article sur le pathfinding A star - xion</title>
    <link>http://blog.lalex.com/post/2004/04/26/Erratum-article-sur-le-pathfinding-A-star#c2207</link>
    <guid isPermaLink="false">urn:md5:2c39190e8fe1e1fa067a2d987a29491b</guid>
    <pubDate>Tue, 16 Aug 2005 18:57:28 +0000</pubDate>
    <dc:creator>xion</dc:creator>
    
    <description>&lt;p&gt;Salut, merci de ta réponse ;).&lt;/p&gt;&lt;p&gt;Quand tu dis que l'arbre binaire est toujours trié... il l'est à chaque fois, mais pour une des deux branches principales... or dans certains cas, il peut y avoir une branche qui n'est finalement pas mise à jour.. (je suppose que c'était le cas dans mon exemple, car ça n'était pas un problème de non-optimisation, mais une erreur de chemin, qui amenait à des valeurs illogiques et qui sont fausses au niveau du chemin)&lt;/p&gt;&lt;p&gt;Cependant, n'étant pas sur mon ordi et n'ayant pas mon code de base, je ne puis dire si c'était plutôt une erreur de traitement pendant la gestion du tri de l'arbre... donc en attente &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt;&lt;br /&gt;De plus j'essaierait d'utiliser ta version as2 pour voir si c'est une erreur ou bien un défaut de mon implémentation java...&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Erratum article sur le pathfinding A star - LAlex</title>
    <link>http://blog.lalex.com/post/2004/04/26/Erratum-article-sur-le-pathfinding-A-star#c2206</link>
    <guid isPermaLink="false">urn:md5:93c9fcadb0ea5ab65e5d445a7d5b380f</guid>
    <pubDate>Tue, 16 Aug 2005 10:06:51 +0000</pubDate>
    <dc:creator>LAlex</dc:creator>
    
    <description>&lt;p&gt;&lt;quote&gt;d'abord, si tu utilises ALLOW_DIAG, ne serait-ce pas plus logique d'utiliser if(!ALLOW_DIAG) pour la première condition étant donné que si on n'utilise pas les diagonales, on n'a pas la complication dont tu t'occupes après (dans le else) ?&lt;/p&gt;
&lt;p&gt;de plus, le calcul des diagonales me paraît faut :&lt;br /&gt;
var nbDiag = Math.abs(x1-x0-y1+y0);&lt;/quote&gt;Tu as tout à fait raison. Incroyable d'être passé la-dessus sans le voir. &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_redface.gif&quot; alt=&quot;:$&quot; class=&quot;smiley&quot; /&gt; Merci! &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_cool.gif&quot; alt=&quot;8)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;quote&gt;nbDiag * 14 ne marcherait pas ? ou alors une constante genre DEFAULT_DIAG_COST qui vaudrait 14 par exemple&lt;/quote&gt;En effet, c'est largement optimisable, mais plutôt en utilisant un ratio. Il n'est pas normal que l'on ai à modifier deux variables pour un chagement du coût par défaut. La solution serait d'utiliser une variable statique DIAG_RATIO. Si on veut être mathématiquement exact, ce serait DIAG_RATIO=Math.sqrt(2), et si on veut éviter trop de virgules, on peut mettre DIAG_RATIO =1.4...&lt;/p&gt;
&lt;p&gt;Ensuite, concernant le tri des arbres binaires, le ''&lt;=&quot; sert à éviter des boucles supplémentaires... En effet, ce tri fonctionne par permutations, et en fait, étant donné que le tableau est déjà trié et qu'on se contente de rajouter une nouvelle valeur, on peut considérer indifféremment qu'on va permuter deux valeurs égales ou non. J'ai choisi la deuxième option...&lt;br /&gt;
Je n'ai pas analysé en détail le cas pratique que tu donnes, mais a priori, a partir du moment ou le tableau est trié, ca devrait fonctionné. Peut-être que cela peut provoquer un chute des performances dans certains cas, mais ca devrait les améliorer dans d'autres cas... On ne peut pas tout avoir ! &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_mrgreen.gif&quot; alt=&quot;:mrgreen:&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;
&lt;p&gt;En gros, voici la méthode heuristique rectifiée grace a tes remarques :&lt;code class=&quot;actionscript&quot;&gt;&lt;span style=&quot;color: #0066CC;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; DIAG_RATIO:&lt;span style=&quot;color: #0066CC;&quot;&gt;Number&lt;/span&gt; = &lt;span style=&quot;color: #0066CC;&quot;&gt;Math&lt;/span&gt;.&lt;span style=&quot;color: #0066CC;&quot;&gt;sqrt&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//.....&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0066CC;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; heuristic&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;mp:&lt;span style=&quot;color: #0066CC;&quot;&gt;Array&lt;/span&gt;, x0, y0, x1, y1&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;Number&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;!ALLOW_DIAG&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0066CC;&quot;&gt;Math&lt;/span&gt;.&lt;span style=&quot;color: #0066CC;&quot;&gt;abs&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;x1-x0&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;+&lt;span style=&quot;color: #0066CC;&quot;&gt;Math&lt;/span&gt;.&lt;span style=&quot;color: #0066CC;&quot;&gt;abs&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;y1-y0&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;*DEFAULT_COST;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; dX:&lt;span style=&quot;color: #0066CC;&quot;&gt;Number&lt;/span&gt; = &lt;span style=&quot;color: #0066CC;&quot;&gt;Math&lt;/span&gt;.&lt;span style=&quot;color: #0066CC;&quot;&gt;abs&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;x1-x0&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; dY:&lt;span style=&quot;color: #0066CC;&quot;&gt;Number&lt;/span&gt; = &lt;span style=&quot;color: #0066CC;&quot;&gt;Math&lt;/span&gt;.&lt;span style=&quot;color: #0066CC;&quot;&gt;abs&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;y1-y0&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;Math&lt;/span&gt;.&lt;span style=&quot;color: #0066CC;&quot;&gt;round&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0066CC;&quot;&gt;Math&lt;/span&gt;.&lt;span style=&quot;color: #0066CC;&quot;&gt;min&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;dX, dY&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;*DIAG_RATIO*DEFAULT_COST&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;+&lt;span style=&quot;color: #0066CC;&quot;&gt;Math&lt;/span&gt;.&lt;span style=&quot;color: #0066CC;&quot;&gt;abs&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;dX-dY&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;*DEFAULT_COST;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Je vais republier la classe rectifiée. Merci encore de tes infos.&lt;/p&gt;</description>
  </item>
      
    
    <item>
    <title>Erratum article sur le pathfinding A star - xion</title>
    <link>http://blog.lalex.com/post/2004/04/26/Erratum-article-sur-le-pathfinding-A-star#c2205</link>
    <guid isPermaLink="false">urn:md5:d1e395af0a9840f4e1a109eb98b38d48</guid>
    <pubDate>Mon, 15 Aug 2005 19:10:44 +0000</pubDate>
    <dc:creator>xion</dc:creator>
    
    <description>&lt;p&gt;resalut... je ne sais pas si c'est propre à ma méthode réimplémentation, mais bon, je le poste quand même...&lt;/p&gt;&lt;p&gt;j'ai réimplémenté la base de ton pathfinder, en l'orientant plus objet et en changeant certains point structurel, cependant cela en java...&lt;br /&gt;et au final, j'ai réussi à faire marcher ça correctement, mais juste avant de trouver la fin, je suis resté bloqué sur un point qui était pourtant compréhensible...&lt;/p&gt;&lt;p&gt;Ta méthode de tri de l'open :&lt;br /&gt;&lt;code class=&quot;actionscript&quot;&gt;&lt;span style=&quot;color: #0066CC;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0066CC;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; sortOpenListFrom&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;lst,ind&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;span style=&quot;color: #0066CC;&quot;&gt;Void&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;BINARY_HEAPS&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; curInd:&lt;span style=&quot;color: #0066CC;&quot;&gt;Number&lt;/span&gt; = ind;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On trie d'un enfant vers son parent&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Si l'indice est 1, on arrete car on est en&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// haut de l'arbre&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;curInd &amp;gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; parInd = &lt;span style=&quot;color: #0066CC;&quot;&gt;Math&lt;/span&gt;.&lt;span style=&quot;color: #0066CC;&quot;&gt;floor&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;curInd/&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Si le parent a un cout inferieur, on arrete le tri&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;curInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;totCost&lt;/span&gt; &amp;gt;= lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;parInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;totCost&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; tmp:&lt;span style=&quot;color: #0066CC;&quot;&gt;Object&lt;/span&gt; = lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;parInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;parInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; = lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;curInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;curInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; = tmp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; curInd = parInd;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/code&gt;Je ne sais pas si ça marche en as2, étant donné que je n'ai testé que mon implémentation java, mais en java ça foire...La relation d'erreur est faite entre :&lt;code class=&quot;actionscript&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;curInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;totCost&lt;/span&gt; &amp;gt;= lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;parInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;totCost&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/code&gt;et&lt;code class=&quot;actionscript&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; heur:&lt;span style=&quot;color: #0066CC;&quot;&gt;Number&lt;/span&gt; = PathFinder.&lt;span style=&quot;color: #006600;&quot;&gt;heuristic&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;mp,curX,curY,x1,y1&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;var&lt;/span&gt; newPt:&lt;span style=&quot;color: #0066CC;&quot;&gt;Object&lt;/span&gt; = &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt; x:curX, y:curY, pathCost:curPathCost, togoCost:heur, totCost:curPathCost+heur, parent:curPnt &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cloneMap&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;curX&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;curY&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; = newPt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PathFinder.&lt;span style=&quot;color: #006600;&quot;&gt;open&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;openList, newPt&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/code&gt;Je m'explique :Imaginons que j'ai une surface sans bloqueur.Je suis à (2,2) et je vais à (10,0).Chez moi ça a bloqué à partir de (5,0)... pourquoi :-à 4.1 : F(5,0) = 88 (d'après mon implémentation, mais cela ne change rien), disons F(5,0) = VALUE;or F(5,1) = 88 aussi (VALUE) mais c'est normalétant donné la manière de tourner des boucles, c'est à 5.0 que ça passe-à 5.0 : F(6,0) = 88 (VALUE), ce qui est juste, c'est en fait le seul point acceptable à ce momentor F(5.1) qui normalement devrait valoir une valeur plus grande étant donné que la valeur de retour de l'heuristique est relative à chaque case.. bas c'est pas le cas étant donné que la boucle n'a pas encore passé à 5.1 et donc il vaut toujours 88 (VALUE), sa valeur précédente...Dans le tri, on va avoir 6.0 qui remonte, et son parent 5.1 ne le laissera pas passé, alors qu'il le ferait s'il était à jour... c'est dû à ton&lt;code class=&quot;actionscript&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;curInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;totCost&lt;/span&gt; &amp;gt;= lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;parInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;totCost&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/code&gt;Donc il suffit d'écrire :&lt;code class=&quot;actionscript&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;curInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;totCost&lt;/span&gt; &amp;gt; lst&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;parInd&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #006600;&quot;&gt;totCost&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;et hop, tous les cases sont totalement triées... et il n'y a plus de problèmes du tout &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt;&lt;br /&gt;Je ne sais pas si j'ai fait une modification lors de mon implémentation java qui n'a pas la même structure je l'avoue, mais étant donné que dans mon implémentation java cela a causé des problèmes, je le notifie ici &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;p&gt;Si j'ai oublié quelque chose qui justifierai ton signe et son égalité, dites-le-moi &lt;img src=&quot;http://common.lalex.com/themes/devblog/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;</description>
  </item>
      
</channel>
</rss>