|
huchaolan
新手上路

积分 15
发帖 6
注册 2007-4-12
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
这个牛哈
看不懂,但玩的有意思
This is quite amazing. I don't understand it, but it's fun to play.
|
|
2009-5-9 20:29 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
我抄袭一下zh159
If Not (IsObject(Navigator)) Then
Dim Ie
Set Ie=WScript.CreateObject("InternetExplorer.Application","Event_")
'Msgbox "WSH"
MainF()
Else
'Msgbox "IEE"
End IF
Sub MainF()
Path="file://" & WScript.ScriptFullName
With Ie
.Navigate ("about:blank")
.Document.Write ("<Script Language=VBScript Src=""" & Path & """></Script><Script Langage=JavaScript></Script>") '需要写入的内容
.Document.Write ("<style>.GUIwh{width:24;height:24;cursor:hand;}</style><Body></Body>")
'窗口大小\位置
.Width = 660 '宽
.Height = 550 '高
.Resizable = 0 '不允许用户改变窗口大小'
.Left = Fix((.Document.ParentWindow.Screen.AvailWidth-.Width)/2) '水平居中
.Top = Fix((.Document.ParentWindow.Screen.AvailHeight-.Height)/2) '垂直居中
.Document.Title = " " '标题
.Document.Body.Scroll = "no" '关闭滚动条
.Document.Body.OnconTextMenu = GetRef("Disabled") '禁止右键
.Document.Body.OnSelectStart = GetRef("Disabled") '禁止选取
.Document.Body.Style.CssText = "background: SteelBlue ;color:#ffffff;"
.Document.Body.InnerHtml = "<table id=aT><tr><td><TABLE id=bT></TABLE></td><td id=sD></td></tr></table>"
.Document.ParentWindow.ExecScript "build(19)","VBScript"
With.Document.Body.All
.aT.Align = "Center"
.aT.Width = "630"
.aT.Border = "1"
.aT.BorderColor = "#ffffff"
.aT.CellSpacing = "0"
.aT.CellPadding = "10"
.aT.Style.CssText = "font: 13px 宋体;border-collapse:collapse;"
.aT.Rows(0).Align = "Center"
.aT.Rows(0).Cells(0).Width = "450"
.aT.Rows(0).Cells(0).Height = "450"
.bT.Align = "Center"
.bT.Border = "0"
.bT.BorderColor = "#ffffff"
.bT.CellSpacing = "0"
.bT.CellPadding = "0"
.bT.Style.CssText = "font: 21px 宋体;border:2px solid #ffffff;"
End With
'窗体
'.FullScreen=1
.MenuBar = 0 '取消菜单栏'
.AddressBar = 0 '取消地址栏'
.ToolBar = 0 '取消工具栏'
.StatusBar = 0 '取消状态栏'
.Visible = 1 '显示IE页面'
Set window=.Document.ParentWindow
End With
'.Document.OnClick = GetRef("Test1")
'window.ExecScript "fun()","VBScript"
'Ie.Document.ParentWindow.ExecScript "build(19)","VBScript"
Do
WScript.Sleep 200
Loop
End Sub
Function Test1()
'msgbox "event_boundElements"
End Function
Function Disabled()
Disabled=True
End Function
Function Event_OnQuit()
WScript.Quit
End Function
Function Build(N)
PS=N-1
While (S < N)
If S <= 1 Then charA=chr(43440):charB=chr(43472):charC=chr(43444)
If S >= 1 Then charA=chr(43456):charB=chr(43488):charC=chr(43464)
If S = PS Then charA=chr(43448):charB=chr(43480):charC=chr(43452)
Document.All.bT.insertrow(S)
For j = 0 To PS
If ((S*N+j) Mod PS) = (S Mod PS) Then
Char=charA:charA=charC
Else
Char=charB
End If
Document.All.bT.Rows(S).insertcell(j)
Document.All.bT.Rows(S).Cells(j).ID = S*N+j
Document.All.bT.Rows(S).Cells(j).CLASSName = "GUIwh"
Document.All.bT.Rows(S).Cells(j).InnerHtml = "<span onclick=Ts(this) onMouseOver='innerText=""" &chr(41457)& """;style.color=""blue""' onMouseOut='innerText=""" &chr(43488)& """;style.color=""""'>" &char& "</span>"
'Document.All.bT.Rows(S).Cells(j).InnerHtml = "<span id=mm onclick='Ts(this)' onMouseOver='innerText=X' onMouseOut='innerText=Y'>+</span>"
Next
S=S+1
Wend
End Function
Function Ts(this)
msgbox this.ParentNode.ID
this.parentNode.style.cursor = "default"
this.parentNode.innerHtml = chr(41457)
'PC.style.display = "none"
End Function
Function fun()
Msgbox "this is fun!"
End Function
哈哈
I copy zh159
If Not (IsObject(Navigator)) Then
Dim Ie
Set Ie=WScript.CreateObject("InternetExplorer.Application","Event_")
'Msgbox "WSH"
MainF()
Else
'Msgbox "IEE"
End IF
Sub MainF()
Path="file://" & WScript.ScriptFullName
With Ie
.Navigate ("about:blank")
.Document.Write ("<Script Language=VBScript Src=""" & Path & """></Script><Script Langage=JavaScript></Script>") 'Content to be written
.Document.Write ("<style>.GUIwh{width:24;height:24;cursor:hand;}</style><Body></Body>")
'Window size\position
.Width = 660 'Width
.Height = 550 'Height
.Resizable = 0 'Do not allow users to change window size'
.Left = Fix((.Document.ParentWindow.Screen.AvailWidth-.Width)/2) 'Horizontally centered
.Top = Fix((.Document.ParentWindow.Screen.AvailHeight-.Height)/2) 'Vertically centered
.Document.Title = " " 'Title
.Document.Body.Scroll = "no" 'Close scroll bar
.Document.Body.OnconTextMenu = GetRef("Disabled") 'Disable right click
.Document.Body.OnSelectStart = GetRef("Disabled") 'Disable selection
.Document.Body.Style.CssText = "background: SteelBlue ;color:#ffffff;"
.Document.Body.InnerHtml = "<table id=aT><tr><td><TABLE id=bT></TABLE></td><td id=sD></td></tr></table>"
.Document.ParentWindow.ExecScript "build(19)","VBScript"
With.Document.Body.All
.aT.Align = "Center"
.aT.Width = "630"
.aT.Border = "1"
.aT.BorderColor = "#ffffff"
.aT.CellSpacing = "0"
.aT.CellPadding = "10"
.aT.Style.CssText = "font: 13px SimSun;border-collapse:collapse;"
.aT.Rows(0).Align = "Center"
.aT.Rows(0).Cells(0).Width = "450"
.aT.Rows(0).Cells(0).Height = "450"
.bT.Align = "Center"
.bT.Border = "0"
.bT.BorderColor = "#ffffff"
.bT.CellSpacing = "0"
.bT.CellPadding = "0"
.bT.Style.CssText = "font: 21px SimSun;border:2px solid #ffffff;"
End With
'Form
'.FullScreen=1
.MenuBar = 0 'Cancel menu bar'
.AddressBar = 0 'Cancel address bar'
.ToolBar = 0 'Cancel toolbar'
.StatusBar = 0 'Cancel status bar'
.Visible = 1 'Show IE page'
Set window=.Document.ParentWindow
End With
'.Document.OnClick = GetRef("Test1")
'window.ExecScript "fun()","VBScript"
'Ie.Document.ParentWindow.ExecScript "build(19)","VBScript"
Do
WScript.Sleep 200
Loop
End Sub
Function Test1()
'msgbox "event_boundElements"
End Function
Function Disabled()
Disabled=True
End Function
Function Event_OnQuit()
WScript.Quit
End Function
Function Build(N)
PS=N-1
While (S < N)
If S <= 1 Then charA=chr(43440):charB=chr(43472):charC=chr(43444)
If S >= 1 Then charA=chr(43456):charB=chr(43488):charC=chr(43464)
If S = PS Then charA=chr(43448):charB=chr(43480):charC=chr(43452)
Document.All.bT.insertrow(S)
For j = 0 To PS
If ((S*N+j) Mod PS) = (S Mod PS) Then
Char=charA:charA=charC
Else
Char=charB
End If
Document.All.bT.Rows(S).insertcell(j)
Document.All.bT.Rows(S).Cells(j).ID = S*N+j
Document.All.bT.Rows(S).Cells(j).CLASSName = "GUIwh"
Document.All.bT.Rows(S).Cells(j).InnerHtml = "<span onclick=Ts(this) onMouseOver='innerText=""" &chr(41457)& """;style.color=""blue""' onMouseOut='innerText=""" &chr(43488)& """;style.color=""""'>" &char& "</span>"
'Document.All.bT.Rows(S).Cells(j).InnerHtml = "<span id=mm onclick='Ts(this)' onMouseOver='innerText=X' onMouseOut='innerText=Y'>+</span>"
Next
S=S+1
Wend
End Function
Function Ts(this)
msgbox this.ParentNode.ID
this.parentNode.style.cursor = "default"
this.parentNode.innerHtml = chr(41457)
'PC.style.display = "none"
End Function
Function fun()
Msgbox "this is fun!"
End Function
Haha
|

49206C6F766520796F752067757973 54656C3A3133383238343036373837 |
|
2009-5-10 07:24 |
|
|
zh159
金牌会员
     
积分 3687
发帖 1467
注册 2005-8-8
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
LS的代码只能用在IE浏览器为默认时,且有个bug:鼠标在边缘棋盘格移开后,并不是恢复边缘棋盘格的样子,而是变成中间棋盘格的样子
The code can only be used when IE browser is the default one, and there is a bug: after the mouse moves away from the edge checkerboard, it does not return to the appearance of the edge checkerboard, but becomes the appearance of the middle checkerboard.
|

 |
|
2009-5-10 13:50 |
|
|
netbenton
银牌会员
     批处理编程迷
积分 1916
发帖 752
注册 2008-12-28 来自 广西
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
re 17楼
存为什么扩展名呀?我运行不了呀,
.vbs .js .html .bat
都试了不行呢?
Re: 17th floor
What's the file extension for saving? I can't run it. I've tried.vbs,.js,.html,.bat and none of them work.
|

精简
=> 个人 网志  |
|
2009-5-10 13:56 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
|
2009-5-10 23:19 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
Originally posted by zh159 at 2009-5-10 01:50 PM:
LS的代码只能用在IE浏览器为默认时,且有个bug:鼠标在边缘棋盘格移开后,并不是恢复边缘棋盘格的样子,而是变成中间棋盘格的样子
抄错了,哈哈
mouseout事件的文本应是char,我没看你后边替换的代码,直接填成+了
这个脚本我改了默认浏览器也是正常的呀
Originally posted by zh159 at 2009-5-10 01:50 PM:
The code of the previous poster can only be used when IE is the default browser, and there is a bug: after the mouse moves away from the edge checkerboard, it does not return to the appearance of the edge checkerboard, but becomes the appearance of the middle checkerboard
Copied incorrectly, haha
The text for the mouseout event should be char, I didn't look at the code you replaced later and directly filled it with +
This script I modified also works normally with the default browser
|

49206C6F766520796F752067757973 54656C3A3133383238343036373837 |
|
2009-5-11 02:21 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
就是vbs,嘿嘿
|

49206C6F766520796F752067757973 54656C3A3133383238343036373837 |
|
2009-5-11 02:21 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
这个错误我也碰到,原来是脚本中几个双字节符号造成的,我改成了cha(ascii)才解决掉,可能是你系统是英文版的原因吧
I also encountered this error. It turned out to be caused by several double-byte symbols in the script. I changed them to cha(ascii) to solve it. Maybe it's because your system is in English version.
|

49206C6F766520796F752067757973 54656C3A3133383238343036373837 |
|
2009-5-11 02:23 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 24 楼』:
Re 23楼
使用 LLM 解释/回答一下
能否改改代码让它同时兼容中英文系统呢?
Can you modify the code to make it compatible with both Chinese and English systems at the same time?
|

 |
|
2009-5-11 08:56 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
这些字符我也不熟,你可以换成英文字母先试试
只需要把chr(?????)换成chr(65)-chr(75)就可以了
I can't see the specific content of "?????", so I can't complete the full translation. Please provide the complete content with the specific characters.
|

49206C6F766520796F752067757973 54656C3A3133383238343036373837 |
|
2009-5-11 10:44 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
弄了半天,写了下边这个代码,主要用来得到五子棋落子坐标的横竖撇捺行
我的思路是电脑不去对比整个棋盘,而是紧跟对手的落子判断落子四行是否有五子的风险
只写到提取四行数组
用的是一维数组,像棋盘要是二维的话可以使用 行数*总列(19)+列数 转成一维的
因为一维数组识别四行比较方便,横行步进1,竖行是19,撇是18,捺是20
有关坐标的关系可以使用以下代码观察
显示二维坐标
@echo off
setlocal enabledelayedexpansion
mode con: lines=100 cols=100
for /l %%i in (0,1,18) do (
for /l %%j in (0,1,18) do (
if %%i LSS 10 set x=0
if %%j LSS 10 set y=0
set/p=!x!%%i!y!%%j <nul
set x=&set y=
)
echo.
)
pause
显示一维坐标
@echo off
setlocal enabledelayedexpansion
for /l %%i in (0,1,18) do (
for /l %%j in (0,1,18) do (
set /a f=%%i*19+%%j
if !f! LSS 10 set f=0!f!
if !f! Lss 100 set f=0!f!
call set /p =%%f%% <nul
)
echo.
)
pause
Const N = 19
Const msg = 1
If Ucase(Right(WScript.FullName,11)) = "WSCRIPT.EXE" Then
CreateObject("WScript.Shell").Run "Cmd.exe /K Cscript """ & Wscript.ScriptFullName & """"
WScript.Quit
End If
ReDim arry(N*N-1)
For i =0 To N*N-1
arry(i)=i
Next
Function PriArry()
For i = 0 To 18
For j = 0 To 18
k="00"
If i*N+j > 9 Then k="0"
If i*N+j > 99 Then k=""
s=s & k & arry(i*N+j) & " "
Next
p s
s=""
Next
End Function
While True
PriArry
p xypn(gcon)
Wend
Function xypn(a)
M=N-1 '自定义坐标 标准x_ord*总列数+标准y_ord
x_ord = a\N '横向标准坐标 自定义坐标/总列数
y_ord = a Mod N '竖行标准坐标 自定义坐标/总列数的余数
x_base_value = x_ord*N '坐标所在行的 行首坐标值 (行数*总列数)
y_base_value = a-x_base_value '坐标所在列的 列首坐标值 (坐标值-行首坐标值)
For i = 0 To N-1
hen=hen & x_base_value+i & " " '横行=行首坐标值(x_base_value)以1递加至行尾
shu=shu & y_base_value+i*N & " " '竖行=列首坐标值(y_base_value)以N递加至列尾
Next
str = "横:" & hen & vbCrLf & "竖:" & shu & vcCrLf
px_ord = (Abs(x_ord+y_ord-M)+(x_ord+y_ord-M))\2 '撇行首标准坐标x ((标准x+y) > 18)?(px_ord=(x+y) mod 18):(0)
py_ord = x_ord+y_ord-px_ord '撇行首标准坐标y ((标准x+y) > 18)?(x+y-px_ord):(x+y)
p_base_value = px_ord*N+py_ord '撇行首自定义坐标值 标准x_ord*总列数+标准y_ord
For i = 0 To py_ord-px_ord '撇行长度为 py_ord-px_ord
pie=pie & p_base_value+i*(N-1) & " " '撇行自增量为 N-1
Next
str = str & vbCrLf & "撇:" & pie & vbCrLf
nx_ord = (Abs(x_ord-y_ord)+(x_ord-y_ord))\2 '捺行首标准坐标x nx_ord=((x_ord-y_ord) > 0)?(x_ord-y_ord):(0)
ny_ord = (x_ord-y_ord)*(Sgn(x_ord-y_ord)-1)\2 '捺行首标准坐标y ny_ord=((x_ord-y_ord) < 0)?(x_ord-y_ord):(0)
n_base_value = nx_ord*N+ny_ord '捺行首自定义坐标值 标准x_ord*总列数+标准y_ord
For i = 0 To 18-nx_ord-ny_ord '捺行长度为 18-(nx_ord+ny_ord)
na = na & n_base_value+i*(N+1) & " " '捺行自增量为 N+1
Next
str = str & "捺:" & na
xypn=str
End Function
Function p(str)
If msg Then WScript.Echo str Else InputBox "","",str
End Function
Function gcon()
gcon=WScript.StdIn.ReadLine
End Function
After struggling for a long time, I wrote the following code, which is mainly used to obtain the horizontal, vertical, diagonal, and anti-diagonal lines of the Gobang move coordinates.
My idea is that the computer does not compare the entire chessboard, but judges the risk of five in a row in four lines following the opponent's move. It only reaches extracting the four-line array.
Using a one-dimensional array, if the chessboard is two-dimensional, it can be converted to one-dimensional using row number * total columns (19) + column number. Because it is convenient to identify four lines with a one-dimensional array, the horizontal line steps by 1, the vertical line steps by 19, the diagonal line steps by 18, and the anti-diagonal line steps by 20.
For the relationship of coordinates, you can use the following code to observe:
Display two-dimensional coordinates
@echo off
setlocal enabledelayedexpansion
mode con: lines=100 cols=100
for /l %%i in (0,1,18) do (
for /l %%j in (0,1,18) do (
if %%i LSS 10 set x=0
if %%j LSS 10 set y=0
set/p=!x!%%i!y!%%j <nul
set x=&set y=
)
echo.
)
pause
Display one-dimensional coordinates
@echo off
setlocal enabledelayedexpansion
for /l %%i in (0,1,18) do (
for /l %%j in (0,1,18) do (
set /a f=%%i*19+%%j
if !f! LSS 10 set f=0!f!
if !f! Lss 100 set f=0!f!
call set /p =%%f%% <nul
)
echo.
)
pause
Const N = 19
Const msg = 1
If Ucase(Right(WScript.FullName,11)) = "WSCRIPT.EXE" Then
CreateObject("WScript.Shell").Run "Cmd.exe /K Cscript """ & Wscript.ScriptFullName & """"
WScript.Quit
End If
ReDim arry(N*N-1)
For i =0 To N*N-1
arry(i)=i
Next
Function PriArry()
For i = 0 To 18
For j = 0 To 18
k="00"
If i*N+j > 9 Then k="0"
If i*N+j > 99 Then k=""
s=s & k & arry(i*N+j) & " "
Next
p s
s=""
Next
End Function
While True
PriArry
p xypn(gcon)
Wend
Function xypn(a)
M=N-1 'Custom coordinate Standard x_ord * total columns + standard y_ord
x_ord = a\N 'Horizontal standard coordinate Custom coordinate / total columns
y_ord = a Mod N 'Vertical standard coordinate Remainder of custom coordinate / total columns
x_base_value = x_ord*N 'Row start coordinate value of the coordinate (row number * total columns)
y_base_value = a-x_base_value 'Column start coordinate value of the coordinate (coordinate value - row start coordinate value)
For i = 0 To N-1
hen=hen & x_base_value+i & " " 'Horizontal line = row start coordinate value (x_base_value) incremented by 1 to the end of the row
shu=shu & y_base_value+i*N & " " 'Vertical line = column start coordinate value (y_base_value) incremented by N to the end of the column
Next
str = "Horizontal:" & hen & vbCrLf & "Vertical:" & shu & vcCrLf
px_ord = (Abs(x_ord+y_ord-M)+(x_ord+y_ord-M))\2 'Diagonal line start standard coordinate x ((standard x + y) > 18)?(px_ord=(x+y) mod 18):(0)
py_ord = x_ord+y_ord-px_ord 'Diagonal line start standard coordinate y ((standard x + y) > 18)?(x+y-px_ord):(x+y)
p_base_value = px_ord*N+py_ord 'Diagonal line start custom coordinate value Standard x_ord * total columns + standard y_ord
For i = 0 To py_ord-px_ord 'Diagonal line length is py_ord-px_ord
pie=pie & p_base_value+i*(N-1) & " " 'Diagonal line self-increment is N-1
Next
str = str & vbCrLf & "Diagonal:" & pie & vbCrLf
nx_ord = (Abs(x_ord-y_ord)+(x_ord-y_ord))\2 'Anti-diagonal line start standard coordinate x nx_ord=((x_ord-y_ord) > 0)?(x_ord-y_ord):(0)
ny_ord = (x_ord-y_ord)*(Sgn(x_ord-y_ord)-1)\2 'Anti-diagonal line start standard coordinate y ny_ord=((x_ord-y_ord) < 0)?(x_ord-y_ord):(0)
n_base_value = nx_ord*N+ny_ord 'Anti-diagonal line start custom coordinate value Standard x_ord * total columns + standard y_ord
For i = 0 To 18-nx_ord-ny_ord 'Anti-diagonal line length is 18-(nx_ord+ny_ord)
na = na & n_base_value+i*(N+1) & " " 'Anti-diagonal line self-increment is N+1
Next
str = str & "Anti-diagonal:" & na
xypn=str
End Function
Function p(str)
If msg Then WScript.Echo str Else InputBox "","",str
End Function
Function gcon()
gcon=WScript.StdIn.ReadLine
End Function
|

49206C6F766520796F752067757973 54656C3A3133383238343036373837 |
|
2009-5-11 11:38 |
|
|
netbenton
银牌会员
     批处理编程迷
积分 1916
发帖 752
注册 2008-12-28 来自 广西
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
不管是用二维坐标法,还是一维跨标法,最后还是要进行组串,然后才与规则串匹配
因为在进行规则串匹配时,是按串进行的。其实应该把:显示缓存、横、坚、撇、捺分别定义为数组串较好一点,不必要去进行多次组串操作。
电脑方是根据匹配到的最优规则串进行下子的,根据匹配到的是在哪个数组(横/坚/撇/捺)第几串的第几个字符,即可转换为实际坐标
因为定义了五个数组,所以只要下一个子,就要分别对这五个数组的相应位置进行替换,每个数组仅替换一行的一个字符即可
以行为单元显示肯定要比以字符为单元显示要快好多,因为用了显存串方式,所以可以直接以行为单元显示。
Whether using the two-dimensional coordinate method or the one-dimensional cross-marking method, in the end, it is still necessary to perform string grouping and then match with the rule string. Because when performing rule string matching, it is done by string. Actually, it would be better to define display cache, horizontal, vertical,撇, and 捺 as array strings. There is no need to perform multiple string grouping operations.
The computer side makes a move according to the matched optimal rule string. According to which array (horizontal/vertical/撇/捺) and which string in which array and which character position it is matched, it can be converted into the actual coordinates.
Because five arrays are defined, as long as one move is made, the corresponding positions of these five arrays need to be replaced respectively. Each array only needs to replace one character in a row.
Displaying by row unit is definitely much faster than displaying by character unit. Because the video memory string method is used, it can be directly displayed by row unit.
|

精简
=> 个人 网志  |
|
2009-5-11 12:17 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 28 楼』:
Re 26楼
使用 LLM 解释/回答一下
我的思路是电脑不去对比整个棋盘,而是紧跟对手的落子判断落子四行是否有五子的风险
这样的话电脑的棋力是否太弱了?通常的五子棋算法都是对下一步双方可能出现的情况(四三、双三等等)进行优先级排序,然后选择优先级最高的落点吧。
My idea is that the computer does not compare the entire chessboard, but follows the opponent's move to judge whether there is a five-in-a-row risk in the four rows where the move is made
In this case, is the computer's playing strength too weak? Usually, the Gomoku algorithm sorts the possible situations for both sides in the next step (like four-three, double-three, etc.) in order of priority, and then selects the landing point with the highest priority.
|

 |
|
2009-5-11 12:42 |
|
|
rubble
初级用户
 
积分 23
发帖 15
注册 2009-5-6
状态 离线
|
『第 29 楼』:
算法还没弄懂
使用 LLM 解释/回答一下
太牛了,批处理也有这么强的功能!
That's amazing, batch processing also has such powerful functions!
|
|
2009-5-12 08:09 |
|
|
SNSB
初级用户
 
积分 31
发帖 16
注册 2009-5-6
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
Originally posted by rubble at 2009-5-12 08:09:
太牛了,批处理也有这么强的功能!
真想不到能搞出这一个东西出来,不过代码我就很难懂了。
Originally posted by rubble at 2009-5-12 08:09:
It's so amazing that batch processing can have such powerful functions!
I really didn't expect to come up with this thing, but I find the code hard to understand.
|

SNSB is Not Simply a Biologist! |
|
2009-5-12 08:33 |
|