第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
  • AI難點解析

    查看全部
  • 思路:

    1、遍歷整個棋盤的點,找到還沒有被落子的點

    2、基于規(guī)則計算出每個點的得分,基于得分排序中最高的點落子

    規(guī)則:

    1、讓計算機連上五顆子

    2、阻止人連上五顆子

    查看全部
  • 掌握基本AI知識
    查看全部
    0 采集 收起 來源:課程介紹

    2019-06-13

  • wins[][][]:贏法數(shù)組 mywin=[]; 我方贏法統(tǒng)計數(shù)組 computerwin=[]:計算機方統(tǒng)計數(shù)組
    查看全部
  • } } } this.chessBoard[u][v] = 2; this.type = !this.type; }, // 落子函數(shù) i--X軸交叉點下標 j--Y軸交叉點下標 type--true為黑子,false為白子 backGauge--棋盤邊框線寬度 oneStep: function (i, j, type, backGauge) { this.context.beginPath(); this.context.arc(backGauge + i * this.residue, backGauge + j * this.residue, Math.floor(this.residue / 2) - 3, 0, 2 * Math.PI); this.context.closePath(); var gradient = this.context.createRadialGradient(backGauge + i * this.residue + 2, backGauge + j * this.residue - 2, Math.floor(this.residue / 2) - 3, backGauge + i * this.residue + 2, backGauge + j * this.residue - 2, 0); if (type) { gradient.addColorStop(0, '#0A0A0A'); gradient.addColorStop(1, '#636766'); } else { gradient.addColorStop(0, '#D1D1D1'); gradient.addColorStop(1, '#F9F9F9'); } this.context.fillStyle = gradient; this.context.fill(); } }; chess.init(); };
    查看全部
  • for (var x = 0; x <= this.num; x++) { for (var y = 0; y <= this.num; y++) { if (this.wins[x][y][k] && this.chessBoard[x][y] === 0) { if ((x-q)*(x-q) === 1 ||(y-w)*(y-w) === 1 ) { u = x; v = y; } } } } } } } } } } } } } this.chessList.push([u, v, this.type]); this.oneStep(u, v, this.type, this.backGauge); for (var k = 0; k < this.count; k++) { if (!this.type && this.wins[u][v][k]) { this.myWin[k] += 999; if (this.otherWin[k] < 999) { this.otherWin[k]++; if (this.otherWin[k] >= 5) { alert('電腦贏了'); this.over = true; this.admit = false; this.admitted.classList.add('admit_btn'); this.admitted.classList.remove('start_btn'); this.back.classList.add('admit_btn'); this.back.classList.remove('start_btn'); }
    查看全部
  • for (var x = 0; x <= this.num; x++) { for (var y = 0; y <= this.num; y++) { if (this.wins[x][y][k] && this.chessBoard[x][y] === 0) { if ((x-q)*(x-q) === 1 ||(y-w)*(y-w) === 1 ) { u = x; v = y; } } } } } } } } } if (aIScore[i][j][l] === max) { for (var m = 1; m < 5; m++) { if (myScore[i][j][m] > maxScore) { maxScore = myScore[i][j][m]; u = i; v = j; } else if (myScore[i][j][m] === maxScore) { for (var k = 0; k < this.count; k++) { if (this.otherWin[k] === l) { for (var x = 0; x <= this.num; x++) { for (var y = 0; y <= this.num; y++) { if (this.wins[x][y][k] && this.chessBoard[x][y] === 2) { q = x; w = y; } } }
    查看全部
首頁上一頁123456下一頁尾頁

舉報

0/150
提交
取消
課程須知
本課程是前端高級課程 1、具備算法基礎
老師告訴你能學到什么?
1、五子棋AI的運行原理 2、五子棋AI使用到的數(shù)據(jù)結構 3、編程實現(xiàn)五子棋AI

微信掃碼,參與3人拼團

微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復購買,感謝您對慕課網(wǎng)的支持!