分享和讨论Javascript相关的话题
回复
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

改進:
如果當前處於「自動走棋」的搜尋進程時,場上的class=man以及btn_history將不能被點擊,如果點g12155並彈出modal窗口,則「自動走棋」的搜尋進程中止。

當modal窗口打開時,點擊「開始搜尋」,按鈕將變為「停止搜尋」,按下「停止搜尋」或關閉窗口,都會使其停止。

只需給出所要修改的地方。
上次由 ejsoon 在 2026年 4月 12日 20:57,总共编辑 1 次。
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

gemini thinking:

代码: 全选

為了實現您的需求,我們需要針對 `konigsberg20260412param7794.html` 進行以下幾處修改:

### 1. 定義狀態控制變數與 UI 鎖定函式
在 `<script>` 標籤內的全局變數區域(例如在 `let currState;` 附近)新增一個 flag,並定義一個控制點擊狀態的函式。

```javascript
// 新增:追蹤自動走棋狀態
let isAiRunning = false;

// 新增:切換 UI 互動狀態的函式
function setUIInteraction(disabled) {
    const pointerValue = disabled ? 'none' : 'auto';
    // 鎖定/解鎖所有 class 為 man 的元素
    document.querySelectorAll('.man').forEach(el => {
        el.style.pointerEvents = pointerValue;
    });
    // 鎖定/解鎖 btn_history
    const btnHistory = document.getElementById('btn_history');
    if (btnHistory) btnHistory.style.pointerEvents = pointerValue;
}
```

### 2. 修改「自動走棋」的啟動與結束邏輯
找到負責執行「自動走棋」的函式(通常是處理「自動走棋」按鈕點擊後的邏輯,或名為 `autoPlay`、`aiMove` 的函式)。

```javascript
// 假設自動走棋的進入點函式如下,請在其開始與結束處加入控制
async function startAutoPlay() { // 函式名稱依原代碼而定
    isAiRunning = true;
    setUIInteraction(true); // 禁用點擊

    while (isAiRunning && !gameFinished) {
        // ... 原有的 AI 搜尋與走棋邏輯 ...
        
        // 在循環內部檢查,如果 isAiRunning 被設為 false,則中斷
        if (!isAiRunning) break;
        
        await new Promise(resolve => setTimeout(resolve, 500)); // 假設的延遲
    }

    isAiRunning = false;
    setUIInteraction(false); // 恢復點擊
}
```

### 3. 修改 `g12155` 的點擊事件
找到 `#g12155` 的事件監聽器(這是開啟 Modal 的按鈕),在開啟窗口的同時強制中止搜尋。

```javascript
// 找到 g12155 的 click 監聽處進行修改
document.getElementById('g12155').addEventListener('click', function() {
    if (isAiRunning) {
        isAiRunning = false; // 中止搜尋進程
        setUIInteraction(false); // 立即恢復 UI 互動
        console.log("自動走棋已因開啟窗口而中止");
    }
    
    // ... 原有的彈出 modal 窗口代碼 ...
});
```

### 修改要點說明:
1.  **CSS `pointer-events`**: 這是最簡單且有效的方法。當設為 `none` 時,該元素及其子元素將無法觸發任何鼠標事件(click, hover 等)。
2.  **標誌位 (Flag) 控制**: 透過 `isAiRunning` 變數。當點擊 `g12155` 時將其設為 `false`,則自動走棋的循環(Loop)或遞迴邏輯在下一次檢查時會自動停止。
3.  **範圍限制**: 此修改精確鎖定了 `.man` 和 `#btn_history`,符合您的特定需求。
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

btn_history以及各種按鈕應該不可選取。
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

gemini pro:

代码: 全选

這裡為您提供所需的程式碼修改。您可以直接找到對應的區塊並將其替換或加入新增的程式碼:

### 1. 新增中止搜尋用的全域變數
在 `autoPlayTimer` 和 `isMctsRunning` 宣告的下方,新增一個 `abortMcts` 變數。
```javascript
    let autoPlayTimer = null; // 用於自動下棋的計時器
    let isMctsRunning = false; // 用來追蹤 MCTS 是否正在執行
    let abortMcts = false; // 新增:用來強制中止 MCTS 搜尋
```

### 2. 禁止在搜尋期間點擊棋子 (man)
在 `manOnClick` 函數的開頭加入防護。
```javascript
    // man onclick
    function manOnClick() {
        if (isMctsRunning) return; // 新增:如果正在搜尋中,禁止點擊
        if (game_status == 1 || game_status == 3) {
            let clickmandot = parseInt(this.getAttribute("i"));
```

### 3. 禁止在搜尋期間點擊歷史記錄相關按鈕
在 `historyOnclick` 與設定鈕的事件中加入防護。
```javascript
    // show and set history
    setting_close.onclick = btn_history_set.onclick = function() {
        if (isMctsRunning && this === btn_history_set) return; // 新增:搜尋中禁止點擊設定鈕
        let game_history_parse = [];
```
```javascript
    // history prev
    btn_history_next.onclick = btn_history_prev.onclick = historyOnclick;

    function historyOnclick() {
        if (isMctsRunning) return; // 新增:搜尋中禁止點擊歷史上下頁
        if ("g11048" == this.id) {
```

### 4. 開啟視窗時強制中止搜尋
在 `openMctsModal` 開頭加入 `abortMcts = true`。
```javascript
    // 新增視窗開啟控制
    function openMctsModal() {
        abortMcts = true; // 新增:開啟視窗時立即中止背景正在運行的自動搜尋
        document.getElementById('mcts_results').innerHTML = '';
        currentMctsResults = [];
```

### 5. 關閉視窗時中止搜尋並處理重啟
修改 `closeMctsModal`,中止搜尋、復原按鈕文字,並拔除原本針對 `!isMctsRunning` 的限制,確保自動下棋能順利重啟。
```javascript
    // 新增視窗關閉與觸發控制
    function closeMctsModal() {
        abortMcts = true; // 新增:關閉視窗時中止目前的搜尋
        document.getElementById('mcts_start_btn').innerText = "開始搜尋"; // 新增:復原按鈕文字
        document.getElementById('mcts_modal').style.display = 'none';
        
        if (game_status == 1 || game_status == 3) {
            let autoBlue = document.getElementById('mcts_auto_blue') && document.getElementById('mcts_auto_blue').checked;
            let autoGreen = document.getElementById('mcts_auto_green') && document.getElementById('mcts_auto_green').checked;
            // 修改:移除原本的 && !isMctsRunning 條件,以確保被中止後能再次啟動
            if ((current_man === 0 && autoBlue) || (current_man === 1 && autoGreen)) {
                clearTimeout(autoPlayTimer);
                autoPlayTimer = setTimeout(() => {
                    isMctsRunning = false; // 確保被中止的鎖定狀態強制解除
                    updateMctsParams();
                    runMCTS(true);
                }, 500);
            }
        }
    }
```

### 6. 更新「開始搜尋」按鈕的事件綁定
修改 `mcts_start_btn` 的點擊事件,加入切換「停止搜尋」的邏輯。
```javascript
    document.getElementById("mcts_start_btn").addEventListener('click', function() {
        // 新增:如果正在搜尋,則改為中止行為
        if (isMctsRunning) {
            abortMcts = true;
            this.innerText = "開始搜尋";
            return;
        }

        if (![1, 2, 3, 4].includes(game_status)) {
            document.getElementById('mcts_results').innerHTML = "請在輪到玩家移動時搜尋。";
            return;
        }
        
        this.innerText = "停止搜尋"; // 新增:將按鈕變成停止
        updateMctsParams();
        document.getElementById('mcts_results').innerHTML = "搜尋中,請稍候...";
        setTimeout(() => runMCTS(false), 50);
    });
```

### 7. 在核心 `runMCTS` 中加入中斷判斷與按鈕復原
在 `runMCTS` 內部進行幾處修改,確保每次進入時重置旗標,並在運算中檢查中斷:

**A. 函數開頭重置旗標:**
```javascript
    function runMCTS(isAuto = false) {
        if (isMctsRunning) return; 
        isMctsRunning = true;
        abortMcts = false; // 新增:開始搜尋時重置中止旗標
```

**B. 在提早獲勝或無路可走時復原按鈕文字:**
```javascript
        // (約莫在 if (canShootNow) 的區塊內)
        if (canShootNow) {
            // ... (保留原本邏輯)
            isMctsRunning = false;
            document.getElementById('mcts_start_btn').innerText = "開始搜尋"; // 新增
            return; // 終止後續的 MCTS 展開
        }

        let isFirstGameTurn = game_hp <= 1; 
        let rootMoves = getLegalMoves(rootState, isFirstGameTurn);
        if (rootMoves.length === 0) {
            // ... (保留原本邏輯)
            isMctsRunning = false;
            document.getElementById('mcts_start_btn').innerText = "開始搜尋"; // 新增
            return;
        }
```

**C. 修改 `processNextChunk` 迴圈來接收中止訊號:**
```javascript
        // 非同步分塊執行函數
        function processNextChunk() {
            // 新增:每次迴圈檢查是否收到中止訊號
            if (abortMcts) {
                isMctsRunning = false;
                document.getElementById('mcts_start_btn').innerText = "開始搜尋";
                document.getElementById('thinking_ui').style.display = 'none';
                if (!isAuto) document.getElementById('mcts_results').innerHTML = "搜尋已中止。";
                return;
            }

            if (moveIndex < totalMoves) {
                // ... (保留中間的所有推演邏輯)
                
                moveIndex++;
                // 使用 setTimeout 讓出執行緒,允許瀏覽器重新渲染畫面
                setTimeout(processNextChunk, 0);
            } else {
                // 搜尋全部結束,處理結果
                isMctsRunning = false;
                document.getElementById('mcts_start_btn').innerText = "開始搜尋"; // 新增:搜尋結束自動復原按鈕
                // ... (保留原本剩餘的結算與 UI 更新邏輯)
```
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

konigsberg20260412shutdown7795

增加停止搜尋功能,禁止svg選中。把「必殺搜尋」分成四段。
附件
konigsberg20260412shutdown7795.7z
(13.94 KiB) 已下载 65 次
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

介紹下在本程式中,mcts_first_path是如何應用的?它在processNextChunk中是否一直保持這個值?如果是,應改為只影響到首回合的推演。
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

konigsberg20260412stopthink7797

小修改。

https://ejsoon.vip/wp-content/uploads/2 ... k7797.html
附件
konigsberg20260412stopthink7797.7z
(13.94 KiB) 已下载 65 次
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

改進:
一,把「參數設定」改為「展開」,點擊之後變為「收回」。不要使用details-summary,用js來控制。

二,在「展開」的右邊增加四個按鈕:「簡單、困難、專家、自定」。它們的「mcts_sims、mcts_depth、mcts_max_path、mcts_first_path、fcd_depth1、fcd_depth2、fcd_depth3、fcd_depth4」值分別為:

簡單:10、1、5、3、1、1、1、1。
困難:50、5、7、4、2、2、2、2。
專家:100、10、9、5、2、4、6、8。
「自定」則保持上一次的值。當這些值被修改時,如果改動之後跟前面三個模式都不相同,則程式會自動把模式切換為「自定」。

起初默認選擇的是「簡單」。

三,當在搜尋時,包括自動走棋時的搜尋和打開modal窗口時的搜尋,都要加上計時功能,實時展示用了多少秒。

只需給出所要修改的地方。
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

gemini pro:

「四」錯給為「三」。

代码: 全选

這裡為你整理了實現這三個改進需求的修改部分。請對照你的原始代碼進行相應的替換。

### 第一部分:CSS 樣式修改
在你的 `<style>` 區塊中(例如 `#mcts_modal h3` 的定義附近),加入模式按鈕的樣式:

```css
.mode_btn {
    padding: 2px 6px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    outline: none;
}
.mode_btn.active {
    background: #8278f5;
    color: white;
    border-color: #8278f5;
}
```

### 第二部分:HTML 結構修改
在 `<div id="mcts_modal">` 中,**移除原有的 `<details> ... </details>` 整個區塊**,並替換為以下包含按鈕與收合邏輯的代碼(注意輸入框加入了 `class="mcts_param_input"` 以便 JS 監聽):

```html
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">
    <span id="toggle_params" style="cursor: pointer; font-weight: bold; outline: none; color: #333;">展開</span>
    <div id="mode_buttons" style="display: flex; gap: 4px;">
        <button class="mode_btn" data-mode="easy">簡單</button>
        <button class="mode_btn" data-mode="hard">困難</button>
        <button class="mode_btn" data-mode="expert">專家</button>
        <button class="mode_btn" data-mode="custom">自定</button>
    </div>
</div>
<div id="params_container" style="display: none;">
    <div class="mcts_row"><label>模擬次數:</label> <input type="number" id="mcts_sims" class="mcts_param_input"></div>
    <div class="mcts_row"><label>搜尋深度:</label> <input type="number" id="mcts_depth" class="mcts_param_input"></div>
    <div class="mcts_row"><label>最大步數:</label> <input type="number" id="mcts_max_path" max="9" min="1" class="mcts_param_input"></div>
    <div class="mcts_row"><label>首回限步:</label> <input type="number" id="mcts_first_path" max="9" min="1" class="mcts_param_input"></div>
    <div style="margin-top: 5px; margin-bottom: 5px;">
        <div style="margin-bottom: 5px; font-size: 14px;">必勝搜尋 (橋數 ➔ 深度):</div>
        <div class="mcts_row" style="padding-left: 10px;">
            <label>7</label><input type="number" id="fcd_depth1" style="width: 40px;" class="mcts_param_input">
        </div>
        <div class="mcts_row" style="padding-left: 10px;">
            <label>12</label><input type="number" id="fcd_depth2" style="width: 40px;" class="mcts_param_input">
        </div>
        <div class="mcts_row" style="padding-left: 10px;">
            <label>16</label><input type="number" id="fcd_depth3" style="width: 40px;" class="mcts_param_input">
        </div>
        <div class="mcts_row" style="padding-left: 10px;">
            <label>19</label><input type="number" id="fcd_depth4" style="width: 40px;" class="mcts_param_input">
        </div>
    </div>
</div>
```

### 第三部分:JavaScript 邏輯修改

**1. 新增全域變數與初始化邏輯**
將原本的 `window.onload` 替換並加入模式邏輯,同時宣告計時與預設參數用的變數:

```javascript
// 在 <script> 開頭或宣告變數區域加入以下預設值與計時變數
const PRESETS = {
    easy: [10, 1, 5, 3, 1, 1, 1, 1],
    hard: [50, 5, 7, 4, 2, 2, 2, 2],
    expert: [100, 10, 9, 5, 2, 4, 6, 8]
};
let lastSearchTime = 0; // 記錄最後一次搜尋總耗時

// 替換原有的 window.onload 函數
window.onload = function() {
    let wakeLock = null;
    const requestWakeLock = async () => {
        try {
            wakeLock = await navigator.wakeLock.request('screen');
        } catch (err) {
            console.log(`${err.name}, ${err.message}`);
        }
    }
    document.addEventListener('visibilitychange', async () => {
        if (wakeLock !== null && document.visibilityState === 'visible') {
            requestWakeLock()
        }
    });
    requestWakeLock();
    displayGame();

    // 綁定模式按鈕事件
    document.querySelectorAll('.mode_btn').forEach(btn => {
        btn.addEventListener('click', (e) => setMode(e.target.getAttribute('data-mode')));
    });

    // 綁定輸入框變更事件以自動判斷是否切換為「自定」
    document.querySelectorAll('.mcts_param_input').forEach(input => {
        input.addEventListener('input', checkCustomMode);
    });

    // 綁定展開/收回按鈕
    document.getElementById('toggle_params').addEventListener('click', function() {
        const container = document.getElementById('params_container');
        if (container.style.display === 'none') {
            container.style.display = 'block';
            this.innerText = '收回';
        } else {
            container.style.display = 'none';
            this.innerText = '展開';
        }
    });

    // 初始化為「簡單」模式 (會自動填入參數)
    setMode('easy');

    document.getElementById('mcts_auto_blue').checked = false;
    document.getElementById('mcts_auto_green').checked = true;
    openMctsModal();
}

// 模式切換邏輯
function setMode(mode) {
    document.querySelectorAll('.mode_btn').forEach(btn => btn.classList.remove('active'));
    document.querySelector(`.mode_btn[data-mode="${mode}"]`).classList.add('active');

    if (mode !== 'custom') {
        const vals = PRESETS[mode];
        const inputs = document.querySelectorAll('.mcts_param_input');
        inputs.forEach((input, idx) => {
            input.value = vals[idx];
        });
        updateMctsParams();
    }
}

// 檢查自定模式邏輯
function checkCustomMode() {
    let isMatch = false;
    const currentVals = Array.from(document.querySelectorAll('.mcts_param_input')).map(input => parseInt(input.value) || 0);

    for (const [mode, vals] of Object.entries(PRESETS)) {
        if (vals.every((v, i) => v === currentVals[i])) {
            document.querySelectorAll('.mode_btn').forEach(btn => btn.classList.remove('active'));
            document.querySelector(`.mode_btn[data-mode="${mode}"]`).classList.add('active');
            isMatch = true;
            break;
        }
    }
    if (!isMatch) {
        document.querySelectorAll('.mode_btn').forEach(btn => btn.classList.remove('active'));
        document.querySelector(`.mode_btn[data-mode="custom"]`).classList.add('active');
    }
}
```

**2. 在結果清單中顯示耗時**
修改 `renderMctsResults()` 函數,加上顯示時間的標籤:

```javascript
// 在 renderMctsResults() 中找到這行:
// let resultsHtml = `<b>搜尋完成!共 ${total} 條路徑:</b><br>`;
// 替換為:
let resultsHtml = `<b>搜尋完成!共 ${total} 條路徑:</b><br><span style="font-size:13px; color:#555;">⏱️ 總耗時: ${lastSearchTime} 秒</span><br>`;
```

**3. 計時功能實作**
修改 `runMCTS(isAuto = false)` 函數:

```javascript
function runMCTS(isAuto = false) {
    if (isMctsRunning) return;
    isMctsRunning = true;
    abortMcts = false;

    let searchStartTime = performance.now(); // 記錄開始時間

    let rootState = {
        p0: parseInt(men_bottom[0].getAttribute("i") || men_top[0].getAttribute("i")),
        // ... 原本的 rootState 設定
```

接著往下找到直接勝負判斷 `if (canShootNow)` 和 `if (rootMoves.length === 0)` 的區塊,加入時間顯示:

```javascript
    if (canShootNow) {
        let elapsedSec = ((performance.now() - searchStartTime) / 1000).toFixed(1);
        let msg = `🎯 <b>射殺對手!</b><br>⏱️ ${elapsedSec} 秒`;
        // ... 保持原有邏輯
```
```javascript
    if (rootMoves.length === 0) {
        let elapsedSec = ((performance.now() - searchStartTime) / 1000).toFixed(1);
        if (!isAuto) {
            document.getElementById('mcts_results').innerHTML = `❌ 勝率0%,無路可走!<br>⏱️ ${elapsedSec} 秒`;
        } else {
            let thinkingUI = document.getElementById('thinking_ui');
            thinkingUI.innerHTML = `❌ <b>勝率0%</b><br>無路可走!<br>⏱️ ${elapsedSec} 秒`;
            // ... 保持原有邏輯
```

最後找到處理遞迴的 `processNextChunk()` 函數,並修改 UI 更新邏輯:

```javascript
    function processNextChunk() {
        if (abortMcts) {
            isMctsRunning = false;
            document.getElementById('mcts_start_btn').innerText = "開始搜尋";
            document.getElementById('thinking_ui').style.display = 'none';
            if (!isAuto) document.getElementById('mcts_results').innerHTML = "搜尋已中止。";
            return;
        }

        if (moveIndex < totalMoves) {
            let move = rootMoves[moveIndex];

            // 實時更新 UI 狀態並計算經過時間
            let elapsedSec = ((performance.now() - searchStartTime) / 1000).toFixed(1);
            let statusText = `層數: ${PARAMS.MAX_DEPTH}<br>分支: ${moveIndex + 1} / ${totalMoves}<br>⏱️ 耗時: ${elapsedSec} 秒`;
            
            if (isAuto) {
                thinkingUI.innerHTML = `🤔 <b>思考中...</b><br>${statusText}`;
            } else {
                resultsUI.innerHTML = `<b>搜尋中...</b><br>${statusText}`;
            }

            // ... 保留中間原本的核心推演邏輯 ...

        } else {
            // 搜尋全部結束,處理結果
            isMctsRunning = false;
            document.getElementById('mcts_start_btn').innerText = "開始搜尋";
            
            // 儲存最後總耗時,提供給 renderMctsResults 使用
            lastSearchTime = ((performance.now() - searchStartTime) / 1000).toFixed(1); 

            moveStats.sort((a, b) => { /* 保留原本的排序 */ });

            if (isAuto) {
                let bestStat = moveStats[0];
                if (bestStat.guaranteedWin) {
                    thinkingUI.innerHTML = `🎯 必殺!<br>⏱️ ${lastSearchTime} 秒`;
                } else if (bestStat.immediateLoss) {
                    thinkingUI.innerHTML = `💀 告負<br>⏱️ ${lastSearchTime} 秒`;
                } else if (bestStat.guaranteedLoss) {
                    thinkingUI.innerHTML = `⚠️ 必敗<br>⏱️ ${lastSearchTime} 秒`;
                } else {
                    thinkingUI.innerHTML = `✅ <b>決定!</b><br>預估勝率: ${((bestStat.wins / bestStat.plays) * 100).toFixed(1)}%<br>⏱️ ${lastSearchTime} 秒`;
                }

                setTimeout(() => simulateMove(bestStat.move), 800);
            } else {
                currentMctsResults = moveStats;
                currentMctsPage = 0;
                renderMctsResults(); // 這裡現在會吃到更新好的 lastSearchTime
            }
        }
    }
```
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

konigsberg20260413fourthree7798

增加了「簡單、困難、專家、自定」四種模式。增加搜尋計時。

https://ejsoon.vip/wp-content/uploads/2 ... e7798.html
附件
konigsberg20260413fourthree7798.7z
(14.8 KiB) 已下载 68 次
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

konigsberg20260413endyes781

小修改,當點擊play時去掉redline。

https://ejsoon.vip/wp-content/uploads/2 ... es781.html
附件
konigsberg20260413endyes781.7z
(14.8 KiB) 已下载 63 次
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

戰勝困難模式!

代码: 全选

[[3,6],[-5,3,4,8,5],[5,6,4,3,8,4,5,8],[-5,6,2,1,5,9],[5,9,4,3,8,4,5,8,2,6,1,2,5,1,9,5],[-5,5,6,9,8,4],[4,9,4,3,4,8,5,8,2,6,1,2,5,1,9,5,6,5,9,6,8,9],[-5,9,5,4,0],[4,0,4,3,4,8,5,8,2,6,1,2,5,1,5,9,6,5,9,6,8,9,4,5,0,4],[-5,4,3,0,1,2],[2,0,3,4,4,8,5,8,2,6,2,1,5,1,5,9,6,5,9,6,8,9,4,5,0,4,3,0,0,1],[-5,0,4],[2,4,3,4,4,8,5,8,2,6,2,1,5,1,5,9,6,5,9,6,8,9,4,5,4,0,3,0,0,1],[-5,2,5,1,4,0],[0,4,3,4,4,8,5,8,2,6,2,1,1,5,5,9,6,5,9,6,8,9,4,5,0,4,3,0,0,1,2,5,1,4],[-5,4,7],[0,7,3,4,4,8,5,8,2,6,2,1,1,5,5,9,6,5,9,6,8,9,4,5,0,4,3,0,0,1,2,5,1,4,4,7],[-1,0,1,0,4,1,4,1,5,4,8,4,5,4,7,5,8,5,9,8,9,9,6,6,5]]
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

被困難模式全屏擊殺:

代码: 全选

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg id="konigsberg" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="720" height="480" viewBox="0 0 720 480" style="height: 100%; width: 100%;"><g id="kongnisbersvg">
                <g class="appendarea"><circle cx="180" cy="48" r="24" fill="#fff" stroke="#333" stroke-width="2" i="0"/><circle cx="360" cy="48" r="24" fill="#fff" stroke="#333" stroke-width="2" i="1"/><circle cx="540" cy="48" r="24" fill="#fff" stroke="#333" stroke-width="2" i="2"/><circle cx="90" cy="203.88457268119896" r="24" fill="#fff" stroke="#333" stroke-width="2" i="3"/><circle cx="270" cy="203.88457268119896" r="24" fill="#fff" stroke="#333" stroke-width="2" i="4"/><circle cx="450" cy="203.88457268119896" r="24" fill="#fff" stroke="#333" stroke-width="2" i="5"/><circle cx="630" cy="203.88457268119896" r="24" fill="#fff" stroke="#333" stroke-width="2" i="6"/><circle cx="180" cy="359.7691453623979" r="24" fill="#fff" stroke="#333" stroke-width="2" i="7"/><circle cx="360" cy="359.7691453623979" r="24" fill="#fff" stroke="#333" stroke-width="2" i="8"/><circle cx="540" cy="359.7691453623979" r="24" fill="#fff" stroke="#333" stroke-width="2" i="9"/><path class="arrowbrg" d="M118,203.88457268119896 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="360" style="transform: rotate(360deg); transform-origin: 180px 203.885px 0px;"/><path class="arrowbrg" d="M253,281.82685902179844 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="600" style="transform: rotate(600deg); transform-origin: 315px 281.827px 0px;"/><path class="arrowbrg" d="M343,281.82685902179844 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="840" style="transform: rotate(840deg); transform-origin: 405px 281.827px 0px;"/><path class="arrowbrg" d="M433,125.94228634059948 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="120" style="transform: rotate(120deg); transform-origin: 495px 125.942px 0px;"/><path class="arrowbrg" d="M523,125.94228634059948 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="600" style="transform: rotate(600deg); transform-origin: 585px 125.942px 0px;"/><path class="arrowbrg" d="M523,281.82685902179844 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="480" style="transform: rotate(480deg); transform-origin: 585px 281.827px 0px;"/><path class="arrowbrg" d="M388,48 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="900" style="transform: rotate(900deg); transform-origin: 450px 48px 0px;"/><path class="arrowbrg" d="M253,125.94228634059948 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="660" style="transform: rotate(660deg); transform-origin: 315px 125.942px 0px;"/><path class="arrowbrg" d="M433,281.82685902179844 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="420" style="transform: rotate(420deg); transform-origin: 495px 281.827px 0px;"/><path class="arrowbrg" d="M163,281.82685902179844 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="480" style="transform: rotate(480deg); transform-origin: 225px 281.827px 0px;"/><path class="arrowbrg" d="M208,359.7691453623979 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="180" style="transform: rotate(180deg); transform-origin: 270px 359.769px 0px;"/><path class="arrowbrg" d="M208,48 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="none" stroke-width="2" rotatedeg="540" style="transform: rotate(540deg); transform-origin: 270px 48px 0px;"/><path class="arrowbrg" d="M73,125.94228634059948 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#708090" stroke="none" stroke-width="2" rotatedeg="120" style="transform: rotate(120deg); transform-origin: 135px 125.942px 0px;"/><path class="arrowbrg" d="M73,281.82685902179844 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#708090" stroke="none" stroke-width="2" rotatedeg="60" style="transform: rotate(60deg); transform-origin: 135px 281.827px 0px;"/><path class="arrowbrg" d="M388,359.7691453623979 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#708090" stroke="none" stroke-width="2" rotatedeg="0" style="transform: rotate(0deg); transform-origin: 450px 359.769px 0px;"/><path class="arrowbrg" d="M478,203.88457268119896 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#708090" stroke="none" stroke-width="2" rotatedeg="180" style="transform: rotate(180deg); transform-origin: 540px 203.885px 0px;"/><path class="arrowbrg" d="M298,203.88457268119896 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#708090" stroke="none" stroke-width="2" rotatedeg="180" style="transform: rotate(180deg); transform-origin: 360px 203.885px 0px;"/><path class="arrowbrg" d="M163,125.94228634059948 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#708090" stroke="none" stroke-width="2" rotatedeg="-120" style="transform: rotate(-120deg); transform-origin: 225px 125.942px 0px;"/><path class="arrowbrg" d="M343,125.94228634059948 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#708090" stroke="none" stroke-width="2" rotatedeg="-120" style="transform: rotate(-120deg); transform-origin: 405px 125.942px 0px;"/></g>
                <path class="arrowbrg hide" d="M208,48 v -12 h 100 v -12 l 24 24 l -24 24 v -12 h -100 Z" fill="#C19A6B" stroke="#333" stroke-width="2"/>
                <g class="bottomarea"><circle cx="90" cy="203.88457268119896" r="24" fill="#33d" stroke="none" stroke-width="4" i="3" stroke-dasharray="7 7" class="" style="transform: translate(0px);"/><circle cx="630" cy="203.88457268119896" r="24" fill="#3d3" stroke="none" stroke-width="4" i="6" stroke-dasharray="7 7" class="hide" style="transform: translate(0px);"/></g>
                <g class="middlearea">
                    <path id="movingroute" class="route_tmp hide" d="M360,359.7691453623979 L 450,203.88457268119896 L 360,48 L 270,203.88457268119896 L 90,203.88457268119896 " fill="none" stroke="#333" stroke-linejoin="round" stroke-width="4" stroke-dasharray="12 7">
                        <animate class="dashoffset" attributeName="stroke-dashoffset" values="0;-24000" repeatCount="indefinite" dur="777s"/>
                    </path>
                <line class="redline" x1="630" y1="203.88457268119896" x2="450" y2="203.88457268119896" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="630" y1="203.88457268119896" x2="540" y2="359.7691453623979" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="630" y1="203.88457268119896" x2="540" y2="48" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="450" y1="203.88457268119896" x2="540" y2="359.7691453623979" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="450" y1="203.88457268119896" x2="270" y2="203.88457268119896" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="450" y1="203.88457268119896" x2="360" y2="48" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="450" y1="203.88457268119896" x2="360" y2="359.7691453623979" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="540" y1="48" x2="450" y2="203.88457268119896" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="540" y1="48" x2="360" y2="48" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="270" y1="203.88457268119896" x2="180" y2="359.7691453623979" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="270" y1="203.88457268119896" x2="180" y2="48" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="270" y1="203.88457268119896" x2="360" y2="48" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="360" y1="48" x2="180" y2="48" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="360" y1="359.7691453623979" x2="180" y2="359.7691453623979" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="360" y1="359.7691453623979" x2="540" y2="359.7691453623979" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="360" y1="359.7691453623979" x2="270" y2="203.88457268119896" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="180" y1="48" x2="90" y2="203.88457268119896" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="90" y1="203.88457268119896" x2="180" y2="359.7691453623979" stroke="#e77" stroke-width="7" stroke-linecap="round"/><line class="redline" x1="90" y1="203.88457268119896" x2="270" y2="203.88457268119896" stroke="#e77" stroke-width="7" stroke-linecap="round"/></g>
                <g class="toparea"><circle cx="90" cy="203.88457268119896" r="24" fill="#33d" stroke="none" stroke-width="4" i="3" stroke-dasharray="7 7" class="hide" style="transform: translate(0px);"/><circle cx="630" cy="203.88457268119896" r="24" fill="#3d3" stroke="none" stroke-width="4" i="6" stroke-dasharray="7 7" class="" style="transform: translate(0px);"/></g>
                <use>
                    <animateMotion dur="12s" fill="freeze" additive="sum" id="moveinroute" rotate="auto">
                        <mpath xlink:href="#movingroute"/>
                    </animateMotion>
                </use>
                <g id="g12155">
                    <path d="M 48 420 h 72 v 40 h -72 Z" fill="none" stroke="#fff" stroke-width="2" id="path22"/>
                    <path d="M 48 420 h 48 l -24 40 h -24 Z" fill="#33d" stroke="#fff" stroke-width="2" id="path24" class="hide"/>
                    <path d="M 96 420 h 24 v 40 h -48 Z" fill="#3d3" stroke="#fff" stroke-width="2" id="path26" class=""/>
                </g>
                <g id="g320" transform="translate(38.455111,0.32714844)" class="hide">
                    <circle cx="181.37874" cy="439.67285" r="16" fill="#b0dceb" stroke="#ffffff" stroke-width="2" id="circle33"/>
                    <path style="fill:none;stroke:#8f2929;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 170.86887,429.26053 21.00272,21.00272" id="path102"/>
                    <path style="fill:none;stroke:#8f2929;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 191.87159,429.26053 -21.00272,21.00272" id="path184"/>
                </g>
                <g id="g2370" transform="translate(36.617922,0.32714844)" class="hide">
                    <circle cx="249.33466" cy="439.67285" r="16" fill="#b0dceb" stroke="#ffffff" stroke-width="2" id="circle322"/>
                    <path style="fill:#8f2929;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 255.77156,427.55647 -19.50493,12.27039 19.58086,11.99501 z" id="path479"/>
                </g>
                <g id="g5495" transform="translate(35.32123,0.32714844)" class="hide">
                    <circle cx="316.75009" cy="439.67285" r="16" fill="#b0dceb" stroke="#ffffff" stroke-width="2" id="circle2372"/>
                    <path style="fill:none;stroke:#078f00;stroke-width:4.8;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 307.45708,441.44638 6.70497,7.29655 12.7837,-18.1367" id="path2560"/>
                </g>
                <g id="g8717" transform="translate(38.455111,0.32714844)" class="">
                    <circle cx="379.73492" cy="439.67285" r="16" fill="#b0dceb" stroke="#ffffff" stroke-width="2" id="circle5497"/>
                    <path style="fill:#078f00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 373.27064,427.6435 19.50493,12.27039 -19.58086,11.99501 z" id="path5939"/>
                </g>
                <g id="g11048" transform="translate(0,-2.7672119)" class="">
                    <rect style="fill:#b0dceb;fill-opacity:1;stroke:#fff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect7925" width="46.221607" height="27.315125" x="501.40842" y="429.10965"/>
                    <path style="fill:none;stroke:#490f92;stroke-width:3.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 510.76874,434.58056 v 16.35487" id="path9124"/>
                    <path style="fill:none;stroke:#490f92;stroke-width:3.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 526.0211,436.6151 -7.81082,6.64035 7.61586,6.43247" id="path9885"/>
                    <path style="fill:none;stroke:#490f92;stroke-width:3.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 539.43881,436.6151 -7.81082,6.64035 7.61586,6.43247" id="path10346"/>
                </g>
                <g id="g11376" transform="matrix(-1,0,0,1,1169.14,-2.7672119)" class="hide">
                    <rect style="fill:#b0dceb;fill-opacity:1;stroke:#fff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect11368" width="46.221607" height="27.315125" x="501.40842" y="429.10965"/>
                    <path style="fill:none;stroke:#490f92;stroke-width:3.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 510.76874,434.58056 v 16.35487" id="path11370"/>
                    <path style="fill:none;stroke:#490f92;stroke-width:3.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 526.0211,436.6151 -7.81082,6.64035 7.61586,6.43247" id="path11372"/>
                    <path style="fill:none;stroke:#490f92;stroke-width:3.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 539.43881,436.6151 -7.81082,6.64035 7.61586,6.43247" id="path11374"/>
                </g>
                <rect style="fill:#b0dceb;fill-opacity:1;stroke:#490f92;stroke-width:3.6;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="rect11400" width="21.318359" height="21.318359" x="576.03088" y="429.34082"/>
            </g><style xmlns="http://www.w3.org/1999/xhtml">
    html,
    body {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
    }

    * {
        box-sizing: border-box;
    }

    #titing {
        position: relative;
        width: 100%;
        height: 100%;
    }

    #tiling_inner {
        position: relative;
        padding-top: 66.7%;
    }

    #konigsberg {
        position: absolute;
        float: left;
        background: lightblue;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        user-select: none;
    }

    .arrowbrg {
        transition: transform 1.2s;
    }

    .man {
        transition: transform 1s linear;
    }

    #detail_div {
        position: absolute;
        top: 0;
        left: 0;
        color: #333;
        font-size: 18px;
        z-index: 7;
    }

    #setting_div {
        position: fixed;
        top: 0;
        left: 0;
        color: #333;
        font-size: 18px;
        width: 100%;
        height: 100%;
        z-index: 10;
    }

    #setting_close {
        position: absolute;
        bottom: 12px;
        right: 12px;
        width: 24px;
        height: 24px;
        z-index: 12;
        line-height: 24px;
        text-align: center;
        background: #333;
        color: white;
        cursor: pointer;
    }

    #setting_text {
        position: absolute;
        top: 0;
        left: 0;
        color: #333;
        font-size: 18px;
        width: 100%;
        height: 100%;
        padding: 12px;
        line-height: 1.5;
        resize: none;
    }

    #fullscreen {
        position: absolute;
        z-index: 7;
        top: 7px;
        right: 7px;
        width: 7%;
        height: 7%;
        background: #8278f5;
        cursor: pointer;
    }

    .rotate90 {
        transform: rotate(90deg) !important;
    }

    .hide {
        display: none;
    }
    </style></svg>
SVG preview
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

竟然贏了「專家」!

代码: 全选

[[3,6],[-5,3,4,5,6,9],[9,6,4,3,5,4,6,5,9,6],[-5,6,2,5,8,4,0],[9,0,4,3,5,4,6,5,9,6,2,6,5,2,8,5,4,8,0,4],[-5,9,5,2],[2,0,4,3,5,4,6,5,9,6,2,6,2,5,8,5,4,8,0,4,5,9],[-5,0,4,8,5,1],[2,1,4,3,5,4,6,5,9,6,2,6,2,5,5,8,8,4,4,0,5,9,1,5],[-5,2,1,5,9],[9,1,4,3,5,4,6,5,9,6,2,6,2,5,5,8,8,4,4,0,9,5,5,1,1,2],[-5,1,2,5,8],[9,8,4,3,5,4,6,5,9,6,2,6,5,2,8,5,8,4,4,0,9,5,5,1,2,1],[-5,9,8,5,2],[2,8,4,3,5,4,6,5,9,6,2,6,2,5,5,8,8,4,4,0,9,5,5,1,2,1,9,8],[-5,8,7],[2,7,4,3,5,4,6,5,9,6,2,6,2,5,5,8,8,4,4,0,9,5,5,1,2,1,9,8,8,7],[-1,2,6,2,1,2,5,6,5,5,4,5,1,5,8,4,3,4,0,8,4,8,7]]
https://ejsoon.vip/
弈趣極光:享受思維樂趣
头像
ejsoon
一枝独秀
一枝独秀
帖子: 5786
注册时间: 2022年 11月 18日 17:36
联系:

Re: 改下哥尼斯堡網頁程式

帖子 ejsoon »

補充:
可能大家不知道我做出了哥尼斯堡的AI後,為何會這麼開心這麼興奮。最開心的那一刻,就是第一次發現我根本不是AI的對手。

我以前說過,我願意花錢請聰明的高中生來測試我的弈棋,我主要是想測出我的弈棋的規則有沒有漏洞,是否有必勝著法。

但是結果是,我一個高中生都找不到。首先這個社會是存在信任問題的,他們不認識我,不知道我要幹什麼。再者可能他們沒有時間,也沒有興趣,即便我願意付錢。聰明的高中生是很難找的。並且,就算我真的招到了人,他的水平能測出這些弈棋的漏洞嗎?

而現在,AI徹底解決了這個問題。首先,在我跟AI對弈之後,我確認它的實力已經遠超人類。其次,在AI之間的對弈中,每次開局都是不同的,結局也不盡相同。因此基本上證明了哥尼斯堡是公平且深奧的,並不存在必勝著法。

這比招個高中生或社會人士要高效多了。當我想找人玩,就直接跟「簡單」模式玩,當我想研究和提升水平,我就拿「困難」或「專家」乃至「自定」模式來前後拆解。

我推測哥尼斯堡只是一個前菜,後面我將會為混亂時鐘、我為歌狂、三菱棋等原創弈棋製作AI。這原本是我的人生終極目標之一,但是我感覺它現在離我越來越近。
https://ejsoon.vip/
弈趣極光:享受思維樂趣
回复
  • 相似主题
    回复总数
    阅读次数
    最新帖子

在线用户

正浏览此版面之用户: 没有注册用户 和 3 访客