#infinite-loop

[ follow ]
fromSitePoint Forums | Web Development & Design Community
13 hours ago

Long polling issue

function checkTurn() { if (polling === false) { return; } request = $.ajax({ type: "GET", url: "battleship-checkTurn.php", data: { denBrukeren: denBrukeren, id: gameId, }, async: true, cache: false, timeout: 20000, success: function(data) { console.log('Polling = true'); if (polling === true) { if (data === denBrukeren) { polling = false; loadGame(); } } }, error: function(XMLHttpRequest, textStatus, errorThrown) { console.log('Reached timeout'); }, }); } $(document).ready(function() { setInterval(function() { checkTurn(); }, 20600); }); function abortRequest() { if (request) { request.abort(); } }
Web development
Artificial intelligence
fromBig Think
5 months ago

Why AI gets stuck in infinite loops - but conscious minds don't

Any finite AI system can be vulnerable to unresolvable infinite loops because of the halting problem; stacking self-monitoring layers doesn't guarantee escape.
[ Load more ]