Discuss Scratch
- taichi0802
- Scratcher
8 posts
将棋のAI作成について話し合う!
あっ。それは、もし持ち駒に強い駒しかなかった場合です。まあ、持ち駒に強い駒しかなかった場合は、逃げるか、打つかしかないですけどね・・。おっ!いいアイデアですね!王(玉)の価値は∞(無限大)にすれば、どの駒よりも価値が高くなります!!というか、駒の価値の高いものを、優先的に無理のない程度に狙わせるようにしておいて、王の価値を馬や飛車よりもずっと高くすれば良いのでは?そうですか・・。では、終盤戦になったら、「王手」を優先するようにすればいいのではないでしょうか・・。でも、問題があります・・。どうやって終盤戦と分からせるのかです・・。ぼくの考えでは、駒が、敵陣に4つ入ったら、終盤戦となる としたらいいのではないでしょうか・・。(無理かも) 序盤はそれでも構いませんが、終盤は駒の損得より速度って言いますからね。難しいです、、!
このプログラムも難しそうです・・。でも、成功したら、ぜひ伝えて下さい!では、またお会いしましょう(@_^⭐︎)/
(その時点での獲る手間などを加味した上で点数化して、どの駒に狙いをつけるかを定める、みたいな)
(部外者だけど)
【駒を取る場合】
駒を取る時は、どこを見ても、狙われないなら、取る。自分の駒が取られても、相手の駒を取ってしまう場合も、取る。
(取られてしまう場合は、逃げるか、持ち駒を打って、守る。)
【一番初めに動かす駒】
二六歩・八四歩
【守り・囲い】
敵の駒が、自分の陣(じん)に入ってきたら、守り・囲い をする。
【守る駒】
狙われている場合は、持ち駒で守ります。守るのに適しているのは、「歩」です。打った時、禁じ手「二歩」になる場合は、香を使う。香が無い場合は、桂馬。桂馬が無い場合は、銀。銀が無い場合は、金。金が無い場合は、角。角が無い場合は、飛。飛が無い場合は、逃げる。
とりあえず、場合による動き方を書いておきました。使えるかどうかは分かりませんが、使えたら、伝えて下さい!!では、また!!(@_^⭐︎)/
突然すみません。 飛車は守りには使わないほうがいいかと思います とられた時のリスクなどお考えたらどうでしょう?
(逃げた方が損しないかも・・)
- project124
- Scratcher
100+ posts
将棋のAI作成について話し合う!
How Shogi A.I. Works:
A.I. finds all moves it could possibly make. -
Your project has already done this. Have the project copy them to a list
A.I. scores them
An easy way to score them is to see how many pieces there would be if that move was played. Play that move on an hypothetical board and ten calculate. More accurate results would to weigh the pieces, weigh the pieces where they are on the map, mobility( can a.i. make more moves then opponent after this move?), and king safety(Is the king safe? Is he defended by 2 golds and 1 silver?)
For every move ahead the computer looks at is called a ply. Good A.I. in scratch uses ~Ply 3. But this will slow down the project. So how can we fix this? With Alpha-Beta Pruning. Basically, if the A.I sees its a bad move, it will stop the search, saving computer resources and time. https://en.wikipedia.org/wiki/Computer_shogi for better a.i. knowledge.
Put the scores in their own list
Here is a simple Ply 3 a.i. for shogi I made in python:
A.I. chooses move with highest score.
All moves with the highest score goes into a ‘goodmoves’ list. The A.I. chooses a random move from the goodmoves list.
Here's a simple PLY 3 shogi a.i. withought alpha-beta pruning:
def medium_shogi_move():
global scorelist
global board
global hypoboard
global randbmove
hypoboard = board
bboard = board
counter = 1
ncounter = 1
tcounter = 1
scorelist =
nscorelist =
tscorelist =
hypomoveslist =
nhypomoveslist =
thypomoveslist =
while counter != len(list(board.generate_legal_moves())):
print (“Thinking …” + str(counter))
board = bboard
tempscore = 0
hypoboard = board
board.generate_legal_moves()
randbmove = list(board.generate_legal_moves())
emove = randbmove
hypomoveslist.append(emove)
hypoboard.push(emove)
if hypoboard.is_stalemate():
tempscore = tempscore - 10
if hypoboard.is_checkmate():
tempscore = tempscore + 1000000000000000000000000000000000
tempscore = tempscore + (len(list(hypoboard.generate_legal_moves())) - len(list(board.generate_legal_moves())))
ncounter = 1
nhypoboard = hypoboard
scorelist.append(tempscore)
if scorelist == max(scorelist):
scorelist.pop()
nscorelist =
while ncounter != len(list(hypoboard.generate_legal_moves())):
nhypoboard = hypoboard
print (“Thinking …” + str(counter) + “.” + str(ncounter))
nhypoboard.generate_legal_moves()
randbmove = list(nhypoboard.generate_legal_moves())
emove = random.choice(list(randbmove))
nhypoboard.push(emove)
if nhypoboard.is_stalemate():
tempscore = tempscore + 10
if nhypoboard.is_checkmate():
tempscore = tempscore - 1000000000000000000000000000000000
if nhypoboard.is_check():
tempscore = tempscore - 10
tempscore = tempscore - (len(list(nhypoboard.generate_legal_moves())) - len(list(hypoboard.generate_legal_moves())))
tcounter = 1
nscorelist.append(tempscore)
nhypoboard.pop()
ncounter = ncounter + 1
scorelist.append(tempscore)
hypoboard.pop()
counter = counter+1
counter = 0
counter2 = 0
while scorelist != max(scorelist):
counter = counter + 1
emove = randbmove
print (emove)
board = bboard
board.push(emove)
moveslist.append(emove)
check_for_endgame()
game_loop()
A.I. finds all moves it could possibly make. -
Your project has already done this. Have the project copy them to a list
A.I. scores them
An easy way to score them is to see how many pieces there would be if that move was played. Play that move on an hypothetical board and ten calculate. More accurate results would to weigh the pieces, weigh the pieces where they are on the map, mobility( can a.i. make more moves then opponent after this move?), and king safety(Is the king safe? Is he defended by 2 golds and 1 silver?)
For every move ahead the computer looks at is called a ply. Good A.I. in scratch uses ~Ply 3. But this will slow down the project. So how can we fix this? With Alpha-Beta Pruning. Basically, if the A.I sees its a bad move, it will stop the search, saving computer resources and time. https://en.wikipedia.org/wiki/Computer_shogi for better a.i. knowledge.
Put the scores in their own list
Here is a simple Ply 3 a.i. for shogi I made in python:
A.I. chooses move with highest score.
All moves with the highest score goes into a ‘goodmoves’ list. The A.I. chooses a random move from the goodmoves list.
Here's a simple PLY 3 shogi a.i. withought alpha-beta pruning:
def medium_shogi_move():
global scorelist
global board
global hypoboard
global randbmove
hypoboard = board
bboard = board
counter = 1
ncounter = 1
tcounter = 1
scorelist =
nscorelist =
tscorelist =
hypomoveslist =
nhypomoveslist =
thypomoveslist =
while counter != len(list(board.generate_legal_moves())):
print (“Thinking …” + str(counter))
board = bboard
tempscore = 0
hypoboard = board
board.generate_legal_moves()
randbmove = list(board.generate_legal_moves())
emove = randbmove
hypomoveslist.append(emove)
hypoboard.push(emove)
if hypoboard.is_stalemate():
tempscore = tempscore - 10
if hypoboard.is_checkmate():
tempscore = tempscore + 1000000000000000000000000000000000
tempscore = tempscore + (len(list(hypoboard.generate_legal_moves())) - len(list(board.generate_legal_moves())))
ncounter = 1
nhypoboard = hypoboard
scorelist.append(tempscore)
if scorelist == max(scorelist):
scorelist.pop()
nscorelist =
while ncounter != len(list(hypoboard.generate_legal_moves())):
nhypoboard = hypoboard
print (“Thinking …” + str(counter) + “.” + str(ncounter))
nhypoboard.generate_legal_moves()
randbmove = list(nhypoboard.generate_legal_moves())
emove = random.choice(list(randbmove))
nhypoboard.push(emove)
if nhypoboard.is_stalemate():
tempscore = tempscore + 10
if nhypoboard.is_checkmate():
tempscore = tempscore - 1000000000000000000000000000000000
if nhypoboard.is_check():
tempscore = tempscore - 10
tempscore = tempscore - (len(list(nhypoboard.generate_legal_moves())) - len(list(hypoboard.generate_legal_moves())))
tcounter = 1
nscorelist.append(tempscore)
nhypoboard.pop()
ncounter = ncounter + 1
scorelist.append(tempscore)
hypoboard.pop()
counter = counter+1
counter = 0
counter2 = 0
while scorelist != max(scorelist):
counter = counter + 1
emove = randbmove
print (emove)
board = bboard
board.push(emove)
moveslist.append(emove)
check_for_endgame()
game_loop()
- _ryosuke_
- Scratcher
89 posts
将棋のAI作成について話し合う!
おそらく、、(翻訳ソフトの結果を直しています)
赤い文字が翻訳ソフトに自分の見解を付け足したものです。
黄色い文字が翻訳を手直ししたものです。
将棋A. I.を動かすためには:
A. I.はおそらく全パターンの動きを見つけます。
あなたのプロジェクトはすでにこれをしています(?)
A. I.は彼らのスコアを返します。
彼らをスコアで返す簡単な方法は、その動きがされるならば、どれくらいの部分があるだろうかについて見ることです。
仮定的板の上に動く遊びと10は、計算します。
より正確な結果は、部分の重さであるためにそうします。そして、彼らが地図の上にいる部分、機動性(a.i.はこの動きの後より多くの動き(つまり読むこと)、それから敵を作ることができますか?)と王が安全で、計量がある(王の安全性)
(王は無事ですか?彼は、2つの金と1つの銀によって弁護されますか?)
ここまで手直ししました。あとは自力で( ^ω^ )
前にコンピュータが見るあらゆる動きのために、1層は呼ばれます。
かき傷の良いA. i.は、~層3を使います。
しかし、これはプロジェクトを遅くします。
それで、どのように、我々はこれを固定することができますか?
アルファ-ベータ刈り込みで。
Aならば基本的に。私は、見ますその悪い動き、それは検索を止めます。そして、コンピュータ資源と時間を節約する。より良いa.i.知識のためのhttps://en.wikipedia.org/wiki/Computer_shogi。
彼ら自身のリストにスコアを書いてください
ここに私がパイソンでした将棋のための単純なPly 3 a.i.がある。
A. i.は、最高スコアで動きを選びます。
最高のものによる動きが記録するすべては、『goodmoves』リストに入ります。
A. I.は、ランダムな動きをgoodmovesリストから選びます。
単純なPLY 3将棋a.i. withoughtアルファ-ベータ刈り込みは、ここにあります:
〜Pythonプログラム〜
赤い文字が翻訳ソフトに自分の見解を付け足したものです。
黄色い文字が翻訳を手直ししたものです。
将棋A. I.を動かすためには:
A. I.はおそらく全パターンの動きを見つけます。
あなたのプロジェクトはすでにこれをしています(?)
A. I.は彼らのスコアを返します。
彼らをスコアで返す簡単な方法は、その動きがされるならば、どれくらいの部分があるだろうかについて見ることです。
仮定的板の上に動く遊びと10は、計算します。
より正確な結果は、部分の重さであるためにそうします。そして、彼らが地図の上にいる部分、機動性(a.i.はこの動きの後より多くの動き(つまり読むこと)、それから敵を作ることができますか?)と王が安全で、計量がある(王の安全性)
(王は無事ですか?彼は、2つの金と1つの銀によって弁護されますか?)
ここまで手直ししました。あとは自力で( ^ω^ )
前にコンピュータが見るあらゆる動きのために、1層は呼ばれます。
かき傷の良いA. i.は、~層3を使います。
しかし、これはプロジェクトを遅くします。
それで、どのように、我々はこれを固定することができますか?
アルファ-ベータ刈り込みで。
Aならば基本的に。私は、見ますその悪い動き、それは検索を止めます。そして、コンピュータ資源と時間を節約する。より良いa.i.知識のためのhttps://en.wikipedia.org/wiki/Computer_shogi。
彼ら自身のリストにスコアを書いてください
ここに私がパイソンでした将棋のための単純なPly 3 a.i.がある。
A. i.は、最高スコアで動きを選びます。
最高のものによる動きが記録するすべては、『goodmoves』リストに入ります。
A. I.は、ランダムな動きをgoodmovesリストから選びます。
単純なPLY 3将棋a.i. withoughtアルファ-ベータ刈り込みは、ここにあります:
〜Pythonプログラム〜
Last edited by _ryosuke_ (April 24, 2018 10:34:27)
- watashida
- Scratcher
500+ posts
将棋のAI作成について話し合う!
python読めるけどもう少しコメントを入れてほしい
なんとなくab法で探索していることはわかるけど
なんとなくab法で探索していることはわかるけど
機械学習たーのしー!わーい!
- watashida
- Scratcher
500+ posts
将棋のAI作成について話し合う!
あと駒の点数付けだけでは動かしても評価値が変わらないのでかなりきついのでは?
機械学習たーのしー!わーい!
- hhayyatto
- Scratcher
1000+ posts
将棋のAI作成について話し合う!
#将棋プログラム
#価値設定
香=10
歩=20
銀=40
桂=65
金=100
角=250
飛=310
王=1000000
もし<狙われている場合>
歩を打つ
二歩になる場合
香を打つ
(省略)
角がない場合
飛を打つ
もし<相手が攻めようとしているなら>
王を守る
hha ha hhayy hayy hhay hh hhayya haya hhayyat hhayyatt hhayyatta hhayyattoカラーズCOLOR colour色קאליר こちらは思案(私語は慎むように
hyde::looks//8=72 3=12 5=30 12=何? その名も、⏯⚠️ウクライナ色⏯ウクラ███#1の注意事項は読みました Yoylecake!!!
⚠️イナ色███問:この字の読み方を答えなさい。「宇柳貝」
1+2+3+4+…=-1/12=それマジで言ってる? :) HSPの教科書が買えない
- project124
- Scratcher
100+ posts
将棋のAI作成について話し合う!
Here is a commented version:
Translation of comments below script スクリプトの下のコメントの翻訳
def medium_shogi_move(): ## Creates a function. In scratch this would be a custom block.
global scorelist
global board
global hypoboard ## Don't worry about this stuff
global randbmove
hypoboard = board
bboard = board
counter = 1
ncounter = 1
tcounter = 1
scorelist = # creates score list
nscorelist =
tscorelist =
hypomoveslist =
nhypomoveslist =
thypomoveslist =
while counter != len(list(board.generate_legal_moves())):
print (“Thinking …” + str(counter))
board = bboard
tempscore = 0
hypoboard = board ## sets a hypothetical board to what the board is currently
board.generate_legal_moves()
randbmove = list(board.generate_legal_moves())
emove = randbmove
hypomoveslist.append(emove) ## Does a legal move onto the hypothetical board
hypoboard.push(emove)
if hypoboard.is_stalemate(): ## Here is the scoring
tempscore = tempscore - 10
if hypoboard.is_checkmate():
tempscore = tempscore + 1000000000000000000000000000000000
tempscore = tempscore + (len(list(hypoboard.generate_legal_moves())) - len(list(board.generate_legal_moves())))
ncounter = 1
nhypoboard = hypoboard
scorelist.append(tempscore)
if scorelist == max(scorelist): ## Alpha-Beta Pruning , this is ply2+
scorelist.pop()
nscorelist =
while ncounter != len(list(hypoboard.generate_legal_moves())):
nhypoboard = hypoboard
print (“Thinking …” + str(counter) + “.” + str(ncounter))
nhypoboard.generate_legal_moves()
randbmove = list(nhypoboard.generate_legal_moves())
emove = random.choice(list(randbmove))
nhypoboard.push(emove)
if nhypoboard.is_stalemate():
tempscore = tempscore + 10
if nhypoboard.is_checkmate():
tempscore = tempscore - 1000000000000000000000000000000000
if nhypoboard.is_check():
tempscore = tempscore - 10
tempscore = tempscore - (len(list(nhypoboard.generate_legal_moves())) - len(list(hypoboard.generate_legal_moves())))
tcounter = 1
nscorelist.append(tempscore)
nhypoboard.pop()
ncounter = ncounter + 1
scorelist.append(tempscore)
hypoboard.pop()
counter = counter+1
counter = 0
counter2 = 0
while scorelist != max(scorelist): ## Here puts moves with highest score into a different list
counter = counter + 1
emove = randbmove ## chooses random move from the good moves
print (emove)
board = bboard
board.push(emove)
moveslist.append(emove)
check_for_endgame()
game_loop()
TRANSLATED WITH GOOGLE TRANSLATE (Sorry)
関数を作成します。スクラッチでは、これはカスタムブロックになります
このことを心配しないで
スコアリストを作成する
ボードが現在あるものに仮説ボードを設定する
仮説的なボードに合法的な動きをするか
スコアはここにあります
アルファ - ベータ剪定、これはply2 +
ここでは最高得点の移動を別のリストに入れます
良い動きからランダムな動きを選ぶ
Translation of comments below script スクリプトの下のコメントの翻訳
def medium_shogi_move(): ## Creates a function. In scratch this would be a custom block.
global scorelist
global board
global hypoboard ## Don't worry about this stuff
global randbmove
hypoboard = board
bboard = board
counter = 1
ncounter = 1
tcounter = 1
scorelist = # creates score list
nscorelist =
tscorelist =
hypomoveslist =
nhypomoveslist =
thypomoveslist =
while counter != len(list(board.generate_legal_moves())):
print (“Thinking …” + str(counter))
board = bboard
tempscore = 0
hypoboard = board ## sets a hypothetical board to what the board is currently
board.generate_legal_moves()
randbmove = list(board.generate_legal_moves())
emove = randbmove
hypomoveslist.append(emove) ## Does a legal move onto the hypothetical board
hypoboard.push(emove)
if hypoboard.is_stalemate(): ## Here is the scoring
tempscore = tempscore - 10
if hypoboard.is_checkmate():
tempscore = tempscore + 1000000000000000000000000000000000
tempscore = tempscore + (len(list(hypoboard.generate_legal_moves())) - len(list(board.generate_legal_moves())))
ncounter = 1
nhypoboard = hypoboard
scorelist.append(tempscore)
if scorelist == max(scorelist): ## Alpha-Beta Pruning , this is ply2+
scorelist.pop()
nscorelist =
while ncounter != len(list(hypoboard.generate_legal_moves())):
nhypoboard = hypoboard
print (“Thinking …” + str(counter) + “.” + str(ncounter))
nhypoboard.generate_legal_moves()
randbmove = list(nhypoboard.generate_legal_moves())
emove = random.choice(list(randbmove))
nhypoboard.push(emove)
if nhypoboard.is_stalemate():
tempscore = tempscore + 10
if nhypoboard.is_checkmate():
tempscore = tempscore - 1000000000000000000000000000000000
if nhypoboard.is_check():
tempscore = tempscore - 10
tempscore = tempscore - (len(list(nhypoboard.generate_legal_moves())) - len(list(hypoboard.generate_legal_moves())))
tcounter = 1
nscorelist.append(tempscore)
nhypoboard.pop()
ncounter = ncounter + 1
scorelist.append(tempscore)
hypoboard.pop()
counter = counter+1
counter = 0
counter2 = 0
while scorelist != max(scorelist): ## Here puts moves with highest score into a different list
counter = counter + 1
emove = randbmove ## chooses random move from the good moves
print (emove)
board = bboard
board.push(emove)
moveslist.append(emove)
check_for_endgame()
game_loop()
TRANSLATED WITH GOOGLE TRANSLATE (Sorry)
関数を作成します。スクラッチでは、これはカスタムブロックになります
このことを心配しないで
スコアリストを作成する
ボードが現在あるものに仮説ボードを設定する
仮説的なボードに合法的な動きをするか
スコアはここにあります
アルファ - ベータ剪定、これはply2 +
ここでは最高得点の移動を別のリストに入れます
良い動きからランダムな動きを選ぶ
- project124
- Scratcher
100+ posts
将棋のAI作成について話し合う!
I may just make a remix of your shogi project with CPU for demonstration, but with google translate comments for Japanese.
デモのためにCPUを使ってあなたの将棋プロジェクトをリミックスするだけかもしれませんが、Googleでは日本語のコメントを翻訳しています。
デモのためにCPUを使ってあなたの将棋プロジェクトをリミックスするだけかもしれませんが、Googleでは日本語のコメントを翻訳しています。
- hhayyatto
- Scratcher
1000+ posts
将棋のAI作成について話し合う!
そろそろこのトピックもageないと
AIに学習させるのは?
こうすれば強くなるはず
AIに学習させるのは?
こうすれば強くなるはず
hha ha hhayy hayy hhay hh hhayya haya hhayyat hhayyatt hhayyatta hhayyattoカラーズCOLOR colour色קאליר こちらは思案(私語は慎むように
hyde::looks//8=72 3=12 5=30 12=何? その名も、⏯⚠️ウクライナ色⏯ウクラ███#1の注意事項は読みました Yoylecake!!!
⚠️イナ色███問:この字の読み方を答えなさい。「宇柳貝」
1+2+3+4+…=-1/12=それマジで言ってる? :) HSPの教科書が買えない
- syado-
- Scratcher
4 posts
将棋のAI作成について話し合う!
おっ!いいアイデアですね!王(玉)の価値は∞(無限大)にすれば、どの駒よりも価値が高くなります!!というか、駒の価値の高いものを、優先的に無理のない程度に狙わせるようにしておいて、王の価値を馬や飛車よりもずっと高くすれば良いのでは?そうですか・・。では、終盤戦になったら、「王手」を優先するようにすればいいのではないでしょうか・・。でも、問題があります・・。どうやって終盤戦と分からせるのかです・・。ぼくの考えでは、駒が、敵陣に4つ入ったら、終盤戦となる としたらいいのではないでしょうか・・。(無理かも) 序盤はそれでも構いませんが、終盤は駒の損得より速度って言いますからね。難しいです、、!
このプログラムも難しそうです・・。でも、成功したら、ぜひ伝えて下さい!では、またお会いしましょう(@_^⭐︎)/
(その時点での獲る手間などを加味した上で点数化して、どの駒に狙いをつけるかを定める、みたいな)
(部外者だけど)
【駒を取る場合】
駒を取る時は、どこを見ても、狙われないなら、取る。自分の駒が取られても、相手の駒を取ってしまう場合も、取る。
(取られてしまう場合は、逃げるか、持ち駒を打って、守る。)
【一番初めに動かす駒】
二六歩・八四歩
【守り・囲い】
敵の駒が、自分の陣(じん)に入ってきたら、守り・囲い をする。
【守る駒】
狙われている場合は、持ち駒で守ります。守るのに適しているのは、「歩」です。打った時、禁じ手「二歩」になる場合は、香を使う。香が無い場合は、桂馬。桂馬が無い場合は、銀。銀が無い場合は、金。金が無い場合は、角。角が無い場合は、飛。飛が無い場合は、逃げる。
とりあえず、場合による動き方を書いておきました。使えるかどうかは分かりませんが、使えたら、伝えて下さい!!では、また!!(@_^⭐︎)/
突然すみません。 飛車は守りには使わないほうがいいかと思います とられた時のリスクなどお考えたらどうでしょう?
手数を数えて、終盤か序盤を判定させるのはどうでしょう序盤はそれでも構いませんが、終盤は駒の損得より速度って言いますからね。 僕、AIの知識はあまり無いのですが、駒にそれぞれ価値(かち)を付ければいいのではないでしょうか・・。たとえば飛車は13点。桂馬が6点。歩は1点。などの価値を駒それぞれに付ければ、この後どうすればいいかを考えて、それをプログラムにすればいいのではないでしょうか・・。以下略
難しいです、、!
- project124
- Scratcher
100+ posts
将棋のAI作成について話し合う!
Other important topics for shogi A.I.
Joseki Book. The computer needs to know as many shogi josekis as possible. This allows the saving of resources during the first couple of moves.
Pruning. You need to reliably cut of any bad branches off a search tree
Depth. A.I. needs to go at least 3 moves deep
Checkmate strategies. A.I. needs to know how to gold drop for a checkmate.
将棋A.Iの他の重要な話題
Joseki Book。コンピュータはできるだけ多くの将棋ジョゼキスを知る必要があります。これにより、最初の数回の移動中にリソースを節約できます。
剪定。あなたは、確実に検索ツリーから任意の悪い枝をカットする必要があります
深さ。 A.I.少なくとも3回は深く移動する必要があります
検者の戦略。 A.I.チェックメイトのために金を落とす方法を知る必要があります。
Joseki Book. The computer needs to know as many shogi josekis as possible. This allows the saving of resources during the first couple of moves.
Pruning. You need to reliably cut of any bad branches off a search tree
Depth. A.I. needs to go at least 3 moves deep
Checkmate strategies. A.I. needs to know how to gold drop for a checkmate.
将棋A.Iの他の重要な話題
Joseki Book。コンピュータはできるだけ多くの将棋ジョゼキスを知る必要があります。これにより、最初の数回の移動中にリソースを節約できます。
剪定。あなたは、確実に検索ツリーから任意の悪い枝をカットする必要があります
深さ。 A.I.少なくとも3回は深く移動する必要があります
検者の戦略。 A.I.チェックメイトのために金を落とす方法を知る必要があります。
- hhayyatto
- Scratcher
1000+ posts
将棋のAI作成について話し合う!
つまり、AIは定跡を利用、これにより手数節約になる。 Other important topics for shogi A.I.
Joseki Book. The computer needs to know as many shogi josekis as possible. This allows the saving of resources during the first couple of moves.
Pruning. You need to reliably cut of any bad branches off a search tree
Depth. A.I. needs to go at least 3 moves deep
Checkmate strategies. A.I. needs to know how to gold drop for a checkmate.
将棋A.Iの他の重要な話題
Joseki Book。コンピュータはできるだけ多くの将棋ジョゼキスを知る必要があります。これにより、最初の数回の移動中にリソースを節約できます。
剪定。あなたは、確実に検索ツリーから任意の悪い枝をカットする必要があります
深さ。 A.I.少なくとも3回は深く移動する必要があります
検者の戦略。 A.I.チェックメイトのために金を落とす方法を知る必要があります。
ゲーム木から悪い動かし方を除いて、良い手を優先する。
3回以上、非常に良い手を使い、
詰めるために相手の金将を取る方法を知る必要があるとゆうことでしょうか
hha ha hhayy hayy hhay hh hhayya haya hhayyat hhayyatt hhayyatta hhayyattoカラーズCOLOR colour色קאליר こちらは思案(私語は慎むように
hyde::looks//8=72 3=12 5=30 12=何? その名も、⏯⚠️ウクライナ色⏯ウクラ███#1の注意事項は読みました Yoylecake!!!
⚠️イナ色███問:この字の読み方を答えなさい。「宇柳貝」
1+2+3+4+…=-1/12=それマジで言ってる? :) HSPの教科書が買えない
- IRON-OWL
- Scratcher
100+ posts
将棋のAI作成について話し合う!
楽しそうなので来ました。僕はいま画像の凡その認識機能的なのを作っているのですが、王の周りのコマたちに集中して考えさせると詰みやすいか詰みにくいみたいな判定ができるかもしれません
- IRON-OWL
- Scratcher
100+ posts
将棋のAI作成について話し合う!
えっとねやったことから考えるとあまり将棋に序盤と中盤と終盤の明確な手数での差はないから、玉の周りの状況で判断するんだと思う。おっ!いいアイデアですね!王(玉)の価値は∞(無限大)にすれば、どの駒よりも価値が高くなります!!というか、駒の価値の高いものを、優先的に無理のない程度に狙わせるようにしておいて、王の価値を馬や飛車よりもずっと高くすれば良いのでは?そうですか・・。では、終盤戦になったら、「王手」を優先するようにすればいいのではないでしょうか・・。でも、問題があります・・。どうやって終盤戦と分からせるのかです・・。ぼくの考えでは、駒が、敵陣に4つ入ったら、終盤戦となる としたらいいのではないでしょうか・・。(無理かも) 序盤はそれでも構いませんが、終盤は駒の損得より速度って言いますからね。難しいです、、!
このプログラムも難しそうです・・。でも、成功したら、ぜひ伝えて下さい!では、またお会いしましょう(@_^⭐︎)/
(その時点での獲る手間などを加味した上で点数化して、どの駒に狙いをつけるかを定める、みたいな)
(部外者だけど)
【駒を取る場合】
駒を取る時は、どこを見ても、狙われないなら、取る。自分の駒が取られても、相手の駒を取ってしまう場合も、取る。
(取られてしまう場合は、逃げるか、持ち駒を打って、守る。)
【一番初めに動かす駒】
二六歩・八四歩
【守り・囲い】
敵の駒が、自分の陣(じん)に入ってきたら、守り・囲い をする。
【守る駒】
狙われている場合は、持ち駒で守ります。守るのに適しているのは、「歩」です。打った時、禁じ手「二歩」になる場合は、香を使う。香が無い場合は、桂馬。桂馬が無い場合は、銀。銀が無い場合は、金。金が無い場合は、角。角が無い場合は、飛。飛が無い場合は、逃げる。
とりあえず、場合による動き方を書いておきました。使えるかどうかは分かりませんが、使えたら、伝えて下さい!!では、また!!(@_^⭐︎)/
突然すみません。 飛車は守りには使わないほうがいいかと思います とられた時のリスクなどお考えたらどうでしょう?手数を数えて、終盤か序盤を判定させるのはどうでしょう序盤はそれでも構いませんが、終盤は駒の損得より速度って言いますからね。 僕、AIの知識はあまり無いのですが、駒にそれぞれ価値(かち)を付ければいいのではないでしょうか・・。たとえば飛車は13点。桂馬が6点。歩は1点。などの価値を駒それぞれに付ければ、この後どうすればいいかを考えて、それをプログラムにすればいいのではないでしょうか・・。以下略
難しいです、、!
- IRON-OWL
- Scratcher
100+ posts
将棋のAI作成について話し合う!
その学習の元となる部分が必要。何をどのように評価するかってやつ そろそろこのトピックもageないと
AIに学習させるのは?
こうすれば強くなるはず
- watashida
- Scratcher
500+ posts
将棋のAI作成について話し合う!
やっぱりCNN系統で…その学習の元となる部分が必要。何をどのように評価するかってやつ そろそろこのトピックもageないと
AIに学習させるのは?
こうすれば強くなるはず
機械学習たーのしー!わーい!