Blenderを使いMixamo のアニメーションのパックをGodot4 で読み込みやすく変換

Mixamo のアニメーションデータを大量にGodot4に読み込んでAnimationLibraryにするのが手間だったのでPythonで少しだけ扱いやすく変換

次のように実行すると、カレントにY-Bot.glb が出力されます


blender.exe -P fbx_concat_cli.py -- --tpose "Y-Bot.fbx" --animdir "Loco_pack"
tpose モーションを追加したいTポーズでメッシュ付きのfbxを指定
animdir スケルトンのみでメッシュの無いアニメーションデータの詰め合わせを解凍したフォルダ

出来たglbをAnimationLibraryに変換するのに必要なMixamo BoneMap.tres とか使い方はこちら

github.com


今回 自分が3日くらいかかって書いたfbx_concat_cli.py 本体はこちら
Mixamo からダウンロードしたモーションパックを Godotで読み込みやすくglbに変換 · GitHub

Blenderの公式ドキュメント、Bardさん、ChatGPT(無料)さんにも いろいろ教えてもらいながら書きました

python keyboard モジュールでホットキーを設定 する方法をChatGPT(無料)さんに聞いてみた

python keyboard モジュールの使い方を効いてみた
https://github.com/boppreh/keyboard


あとで試す

複数のキーの検出: Python


ユーザー
Windows10でのPythonプログラミングについての質問です。マルチキーボード使用時にどのキーが押されたかを検出するにはどうすればよいですか?

ChatGPT
Python を使用して Windows 10 で複数のキーボードを使用するときにどのキーが押されたかを検出するには、モジュールを使用できますkeyboard。このモジュールは、キーボード イベントをキャプチャして処理する機能を提供します。

以下は、複数のキーボードからのキー押下を検出する方法を示すコード例です。

パイソン

コードをコピーする
import keyboard

# Define the event handler function
def on_key_event(event):
print(f"Key {event.name} was {'pressed' if event.event_type == 'down' else 'released'} on {event.device.name}")

# Add event handler for all keyboards
for device in keyboard.devices():
keyboard.hook(device.id, on_key_event)

# Start listening for events
keyboard.wait()
このコードでは、最初にkeyboardモジュールをインポートします。次に、キーが押されるか離されるたびに呼び出されるイベント ハンドラー関数を定義します。イベント ハンドラー関数は、キーの名前と、それが押されたデバイスの名前を単純に出力します。

次に、関数を使用してすべてのキーボードを反復処理しkeyboard.devices()、関数を使用してキーボードごとにイベント ハンドラーを追加しますkeyboard.hook()。最後に、関数を使用してイベントのリッスンを開始しますkeyboard.wait()。この関数は、キーボードのキーが押されるか放されるまでプログラムをブロックします。

このコードを実行すると、接続されているキーボードのいずれかのキーを押したり放したりするたびに、キーの名前と、そのキーが押されたまたは放されたデバイスの名前が出力されます。





ユーザー
Windows で生成されたイベントはデバイス ID を報告しません (event.device == None)。https://github.com/boppreh/keyboard/issues/21

ChatGPT
あなたは正しいです。このkeyboardモジュールは、複数のキーボードから生成されたイベントの Windows 上のデバイス ID 情報を提供しません。これはモジュールの既知の問題であり、keyboard前述したように GitHub ページに文書化されています。

回避策として、パッケージのwin32apiおよびwin32conモジュールを使用してpywin32、各キーボードのデバイス ID を手動で取得できます。各キーボードのデバイス ID を取得し、それを使用してどのキーボードがキー押下イベントを生成したかを識別する方法を示すコード例を次に示します。

パイソン

コードをコピーする
import keyboard
import win32api
import win32con

# Get the device ID for each keyboard
keyboard_devices = [device for device in keyboard.devices()]
device_id_map = {}
for device in keyboard_devices:
device_handle = win32api.OpenDesktop(device, 0, False, win32con.MAXIMUM_ALLOWED)
device_id = win32api.GetWindowThreadProcessId(device_handle)[-1]
device_id_map[device_id] = device

# Define the event handler function
def on_key_event(event):
device_name = device_id_map.get(event.scan_code, "Unknown device")
print(f"Key {event.name} was {'pressed' if event.event_type == 'down' else 'released'} on {device_name}")

# Add event handler for all keyboards
for device in keyboard_devices:
keyboard.hook(device.id, on_key_event)

# Start listening for events
keyboard.wait()
このコードでは、最初にkeyboard.devices()関数を使用して、接続されているすべてのキーボードのリストを取得します。次に、リストを反復処理し、モジュールOpenDesktop()の およびGetWindowThreadProcessId()関数を使用してwin32api、各キーボードのデバイス ID を取得します。デバイス ID と名前を という辞書に保存しますdevice_id_map。

device_id_map次に、 を使用して、デバイス ID に基づいてイベントを生成したデバイスの名前を検索するイベント ハンドラー関数を定義します。次に、イベント ハンドラー関数は、キーの名前と、キーが押されたまたは放されたデバイスの名前を出力します。

関数を使用してすべてのキーボードにイベント ハンドラーを追加しkeyboard.hook()、関数を使用してイベントのリッスンを開始しますkeyboard.wait()。

このコードを実行すると、接続されているキーボードごとに、キーの名前と、キーが押されるか離されたデバイスの名前が出力されます。





メッセージを送ります。


無料研究のプレビュー。ChatGPT は、人、場所、または事実に関する不正確な情報を生成する可能性があります。ChatGPT 5月3日バージョン



原文
Detecting Multiple Keys: Python


User
question about Python programming in Windows10 .

how to detect witch key when using multi keyboard?

ChatGPT
To detect which key is pressed when using multiple keyboards in Windows 10 using Python, you can use the keyboard module. This module provides functions to capture and handle keyboard events.

Here's an example code that shows how to detect key presses from multiple keyboards:

python
Copy code
import keyboard

# Define the event handler function
def on_key_event(event):
print(f"Key {event.name} was {'pressed' if event.event_type == 'down' else 'released'} on {event.device.name}")

# Add event handler for all keyboards
for device in keyboard.devices():
keyboard.hook(device.id, on_key_event)

# Start listening for events
keyboard.wait()
In this code, we first import the keyboard module. We then define an event handler function that will be called whenever a key is pressed or released. The event handler function simply prints out the name of the key and the name of the device on which it was pressed.

We then iterate over all the keyboards using the keyboard.devices() function and add an event handler for each one using the keyboard.hook() function. Finally, we start listening for events using the keyboard.wait() function, which blocks the program until a key is pressed or released on any of the keyboards.

When you run this code, it will print out the name of the key and the name of the device on which it was pressed or released, whenever you press or release a key on any of the connected keyboards.





User
Events generated under Windows don't report device id (event.device == None).

https://github.com/boppreh/keyboard/issues/21

ChatGPT
You are correct. The keyboard module does not provide device ID information on Windows for events generated from multiple keyboards. This is a known issue in the module, and it is documented on the keyboard GitHub page, as you mentioned.

As a workaround, you can use the win32api and win32con modules from the pywin32 package to get the device ID for each keyboard manually. Here's an example code that shows how to get the device ID for each keyboard and use it to identify which keyboard generated a key press event:

python
Copy code
import keyboard
import win32api
import win32con

# Get the device ID for each keyboard
keyboard_devices = [device for device in keyboard.devices()]
device_id_map = {}
for device in keyboard_devices:
device_handle = win32api.OpenDesktop(device, 0, False, win32con.MAXIMUM_ALLOWED)
device_id = win32api.GetWindowThreadProcessId(device_handle)[-1]
device_id_map[device_id] = device

# Define the event handler function
def on_key_event(event):
device_name = device_id_map.get(event.scan_code, "Unknown device")
print(f"Key {event.name} was {'pressed' if event.event_type == 'down' else 'released'} on {device_name}")

# Add event handler for all keyboards
for device in keyboard_devices:
keyboard.hook(device.id, on_key_event)

# Start listening for events
keyboard.wait()
In this code, we first use the keyboard.devices() function to get a list of all connected keyboards. We then iterate over the list and use the OpenDesktop() and GetWindowThreadProcessId() functions from the win32api module to get the device ID for each keyboard. We store the device ID and name in a dictionary called device_id_map.

We then define an event handler function that uses the device_id_map to look up the name of the device that generated the event, based on the device ID. The event handler function then prints out the name of the key and the name of the device on which it was pressed or released.

We add the event handler for all keyboards using the keyboard.hook() function, and start listening for events using the keyboard.wait() function.

When you run this code, it should print out the name of the key and the name of the device on which it was pressed or released, for each connected keyboard.




Send a message.


Free Research Preview. ChatGPT may produce inaccurate information about people, places, or facts. ChatGPT May 3 Version

GPT2でdoc2vecする方法をChatGPT(無料)さんに聞いてみた

GenSimによるdoc2vec (文字列のベクトル化) が どうも うまくいかないので、GPT-2でdoc2vecする方法をChatGPT(無料)さんに聞いてみた

なのですが、

document_embedding = torch.mean(last_hidden_state, dim=1).squeeze()

「すべてのサブワードにわたる隠れ状態ベクトルの平均を計算」

割と doc2vecの記事でこういう方式が多いので、 これがイマイチ、自分の使い方とミスマッチなのかも



🍮
GPT-2 ドキュメントの埋め込み。


ユーザー
gpt-2から文書特徴ベクトル(文書埋め込み)を抽出する方法を教えてください

ChatGPT
GPT-2 からドキュメントの特徴ベクトル (ドキュメントの埋め込み) を抽出するには、次の手順に従います。

ドキュメントの前処理: GPT-2 では、特定の形式での入力が必要です。ドキュメントをサブワードにトークン化する必要があります。これは、GPT-2 の事前トレーニング中に使用したのと同じトークナイザーを使用して実行できます。

入力の準備: ドキュメントを前処理したら、GPT-2 が理解できる形式に変換する必要があります。これを行うには、BERT で使用される [CLS] や [SEP] トークンなど、ドキュメントの最初と最後に特別なトークンを追加します。

入力を GPT-2 にフィードする: 入力を準備したら、それを GPT-2 にフィードして、モデルの最後のレイヤーから最終的な隠れ状態ベクトルを取得できます。この隠れ状態ベクトルは、ドキュメントの埋め込みと見なすことができます。

モデルの微調整 (オプション): 特定のタスク用にラベル付けされたデータがある場合は、このデータで GPT-2 モデルを微調整できます。この微調整により、モデルの重みが更新され、当面のタスクに合わせて最適化され、より正確なドキュメントの埋め込みが可能になります。

ドキュメントの埋め込みを抽出する: モデルの最後のレイヤーから最終的な隠れ状態ベクトルを取得したら、それをドキュメントの埋め込みとして使用できます。このベクトルは、分類器や回帰モデルなど、他の機械学習モデルへの入力として使用できます。

これらの手順の正確な実装は、GPT-2 の操作に使用している特定のライブラリまたはフレームワークによって異なることに注意してください。たとえば、Hugging Face ライブラリは、Python で GPT-2 を操作するための便利な API を提供します。





ユーザー
Pythonコードを見せてください

ChatGPT
もちろん!Hugging Face トランスフォーマー ライブラリを使用して GPT-2 からドキュメントの埋め込みを抽出する Python コードの例を次に示します。

import torch
from transformers import GPT2Tokenizer, GPT2Model

# Load pre-trained model and tokenizer
model = GPT2Model.from_pretrained('gpt2')
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')

# Define document to be embedded
document = "This is a sample document to be embedded using GPT-2."

# Preprocess the document
encoded_document = tokenizer.encode(document, add_special_tokens=True, return_tensors='pt')

# Generate document embedding
with torch.no_grad():
model_output = model(encoded_document)
last_hidden_state = model_output.last_hidden_state
document_embedding = torch.mean(last_hidden_state, dim=1).squeeze()

# Print document embedding
print(document_embedding)

この例では、まずメソッドを使用して事前トレーニング済みの GPT-2 モデルとトークナイザーを読み込みますfrom_pretrained。次に、埋め込むドキュメントを定義し、encodeトークナイザのメソッドを使用して前処理します。

次に、前処理されたドキュメントを GPT-2 モデルにフィードし、last_hidden_stateモデル出力の属性を使用して最後のレイヤーから最終的な隠れ状態ベクトルを抽出します。次に、PyTorch のメソッドを使用してすべてのサブワードにわたる隠れ状態ベクトルの平均を計算しmean、ドキュメントの埋め込みを取得します。

最後に、ドキュメントの埋め込みベクトルを出力します。このコードは単なる例であり、特定のユース ケースに合わせて調整する必要がある場合があることに注意してください。

「ChatGPTにはハノイの塔が解けない」を検証

「GPT-4にはハノイの塔が解けない」

というツイートが有ったので、ChatGPT(無料)さんで検証したところ、AI が大きな勘違いをしていることが判明


途中をすっ飛ばして、「3枚使うハノイの塔の状態を表にして」の結果

左の3段目の小円盤が真ん中の棒に移動させる際、真ん中の3段目に移動しています

正しくは真ん中の1段目に移動

このあたりの物理ルールを記述してあげれば解けるようになるかも?
(下の段が空の間は落ちる、とか)


以下に、左から3枚の円盤を右に移動する手順を表に示します。1行に1つの手順を示し、列には各棒と段を示します。空の場合は "空" と示します。

左1 左2 左3 中1 中2 中3 右1 右2 右3


以下にChatGPT(無料)さん とのログ


最後の表の部分は上記なので省略


ハノイの塔のルール


User
ハノイの塔の「ルール」を説明してください

ChatGPT
ハノイの塔は、3つの棒といくつかの円盤を使って構成されるパズルです。以下は、ルールの説明です。

すべての円盤は、直径の異なる小さいものから大きいものまで、最初に1つの棒に並べられます。

1回の移動で、1つの円盤を選び、それを別の棒に移動させることができます。ただし、その円盤の上に別の円盤がない限りです。

すべての円盤を、最初の棒から最後の棒に移動させることが目的です。移動のたびに、円盤は常に直径の小さいものが大きいものの上になるようにします。

ルールに従って動かすと、少なくとも2^n - 1回の移動が必要であり、nは円盤の数です。このパズルは、論理的思考や問題解決能力を向上させるために使用されます。





User
左に3枚の円盤、中、右は空の状態です。

一番右に3枚の状態にする手順をお願いします

ChatGPT
ハノイの塔のルールに従って、左から3枚の円盤が右に移動する手順を以下に示します。

最初に、一番上にある円盤を、空の棒である中央の棒に移動させます。
(左から2番目の棒に2枚の円盤が残ります。)

次に、一番大きい円盤を、一番右の棒に移動させます。
(左から2番目の棒に1枚、右の棒に1枚の円盤があります。)

次に、中央の棒にある円盤を、一番右の棒に移動させます。
(左の棒に1枚の円盤があります。)

次に、空の棒である左の棒にある円盤を、中央の棒に移動させます。
(左から2番目の棒に1枚、右の棒に1枚の円盤があります。)

次に、一番大きい円盤を、空の棒である左の棒に移動させます。
(右の棒に2枚の円盤があります。)

次に、一番右の棒にある円盤を、中央の棒に移動させます。
(右の棒に1枚の円盤があります。)

最後に、一番大きい円盤を、一番右の棒に移動させます。
(すべての円盤が右に移動しました。)

この手順を実行すると、左から3枚の円盤が右に移動します。





User
今の手順を表にしてください。1行に1手順、列は左の1段目、左の2段目、左の3段目、中の1段目、中の2段目、中の3段目、右の1段目、右の2段目、右の3段目

セルの内容は、置かれた円盤の大中小、または空とします

お願いします

AI さんに創作論を語って貰った

AI さんに創作論を語って貰ったけど、いまいち話が噛み合って無いでござる

人間との会話でも、こういうことありがちなので、AI に限りませんけれども

これは、むしろ「AI さんが上手く返せる質問が出来てない=自分の創作についての解像度が低く、理解が浅い」ということを意味してるのでは

🍮
ストーリーテリング方法の提案


User
お話を作る創作についての雑談です。

新しく始まる特撮ドラマに「戦隊」とか「ライダー」って付いてると、予備知識が無くても登場人物の役回りなど、見る側の負担がめっちゃ楽になるのですが

チャットAI さんに質問するとき

ゲームエンジンGodot4の質問です」

など、大まかな質問意図から入るのと似てる気がします

そこで質問です。

ライダー、戦隊などの既存の枠組みを使わずに、同様に 知識ゼロの状態から高速にストーリーテリングする方法をいくつか列挙してください。各 50字程度で

よろしくお願いします

ChatGPT
キャラクターの個性や背景を明確にし、それに基づいたドラマチックなストーリー展開を作る。
突然起こる事件や出来事を利用し、その中でキャラクターたちがどう立ち向かっていくかを描く。
特定の場所や世界観を舞台に、その中で起こるドラマを展開する。
特定のテーマやメッセージを持ったストーリーを作り、それに沿ったキャラクターや設定を考える。
ジャンルを横断するようなオリジナルのストーリーを作り、それに合わせたキャラクターを考える。




User
ありがとう。なかなか良いですね。


次に、もう少しベタで4コママンガでも使えるくらいシンプルな手法でお願いします。例えば「食パンをくわえた女の子が「遅刻、遅刻〜」と言いながら走ってくる」

みたいなのも一例ですが、あまり、例に囚われないでお願いします

ChatGPT
あるキャラクターが誰かと約束していて、その約束を果たすために慌てて走っている。
突然、天気が悪化して道路が渋滞したため、遅刻しそうになっている。
キャラクターが遅刻する理由は明確でなく、ただただ必死に走っている様子を描く。
キャラクターが遅刻する理由は何でもよく、ただ走っているだけのシュールなシチュエーションを作る。
キャラクターが遅刻する理由は、まだ明かされていない何か重要なことがあるためであり、それがストーリーの鍵となる。




Send a message.


Free Research Preview. ChatGPT may produce inaccurate information about people, places, or facts. ChatGPT Mar 23 Version

月周回軌道から物を落下させたとき着地速度は?

ChatGPT(無料)さんに質問したところ、垂直方向の速度は1232 m/s みたいです
(一応 検算しました)

これに周回軌道を回るときの水平方向の速度もプラスされますけれども

🍮
自由落下の速度


box headroom
宇宙の質問です。月面からの高さ110kn から物を自由落下させたとき、月面に着地(衝突)するときの速度を教えて下さい

月面からの高さ110 kmから物を自由落下させた場合、その物体が月面に着地するときの速度は、以下のように計算できます。

まず、月の重力加速度を g = 1.62 m/s^2 とします。そして、自由落下の時間 t を求めます。自由落下の式を使うと、以下のようになります。

h = 1/2 * g * t^2

ここで、hは初期高さである110 kmをメートル単位に変換したもの、gは月の重力加速度、tは自由落下の時間です。この式をtについて解くと、

t = sqrt(2*h/g)

t ≒ 787 s

自由落下に必要な時間が約787秒であることが分かります。次に、自由落下中に物体が獲得する速度 v を求めます。自由落下の式を使うと、

v = g * t

v ≒ 1232 m/s

このように、高さ110 kmから自由落下させた物体が月面に衝突するときの速度は約1232 m/sとなります。

BARDさんに「シャイニングフォース」(MD)のAI について聞いてみた

異世界オジイチャンなので

日本語訳

🍮テレビゲームについて質問です。ターン制SRPGでエネミーのAIを実装する方法を教えてください。

🧠確かに、ターンベースの SRPG に敵の AI を実装する方法のいくつかの手順を次に示します。

敵の目標を定義します。敵は何を達成したいのですか?彼らはプレイヤーのユニットを倒したいですか?彼らは特定の目的を達成したいですか?敵の目標がわかったら、それらの目標を達成するための AI の設計を開始できます。
敵の能力を考慮してください。敵は何ができますか?彼らの強みと弱みは何ですか?これは、敵が戦闘でどのように振る舞うべきかを判断するのに役立ちます。
敵のAIを設計します。ここですべてのパーツを組み立てます。敵がどのように決定を下すか、ターゲットに優先順位を付ける方法、能力をどのように使用するかを決定する必要があります。
敵の AI をテストします。敵の AI を設計したら、意図したとおりに動作することを確認するためにテストする必要があります。これを行うには、ゲームをプレイして敵の行動を確認します。テスト結果に基づいて、AI を調整する必要がある場合があります。
ターンベースの SRPG 用に敵 AI を設計するための追加のヒントを次に示します。

敵の AI を挑戦的で公平なものにします。敵はプレイヤーにとって脅威であるべきですが、無敵であってはなりません。
敵に個性を与える。敵はただの愚かな敵であってはなりません。彼らは独自の目標と動機を持っている必要があり、それらの目標と一致する方法で行動する必要があります。
環境を有効に活用してください。敵の AI は環境を有利に利用できるはずです。たとえば、物陰に隠れようとしたり、プレイヤーを罠に誘い込もうとしたりします。
敵の AI を予測不可能に保ちます。プレイヤーは、敵が何をするかを正確に予測することはできません。これにより、ゲームは挑戦的でエキサイティングなものになります。
これが役立つことを願っています!


🍮『シャイニング・フォース』(ジェネシス)で使われているAIについて何か知っていますか?


🧠もちろん。『シャイニング・フォースジェネシス)』で使用されているAIは単純なルールベースのAIです。これは、敵ユニットが一連のルールに基づいて決定を下すことを意味します。たとえば、敵ユニットには、「敵ユニットが範囲内にいる場合、それを攻撃する」というルールがある場合があります。AI は、敵ユニットの攻撃力や防御力などのステータスも考慮します。これにより、敵ユニットは能力に見合った決定を下すことができます。

シャイニング フォースの AI はそれほど洗練されたものではありませんが、プレイヤーに挑戦を与えるには十分効果的です。敵ユニットは攻撃的で、範囲外であってもプレイヤーのユニットを攻撃することがよくあります。これにより、特にプレイヤーが注意を怠ると、ゲームが難しくなる可能性があります。

シャイニング・フォース』の AI は、単純なルールベースの AI を使用して挑戦的で魅力的なゲームを作成する方法の良い例です。敵ユニットは完璧ではありませんが、プレイヤーに良い挑戦を提供することができます. これが、シャイニング フォースが史上最高の戦術ロールプレイング ゲームの 1 つと見なされる理由の 1 つです。

以下は、シャイニング フォースの AI の制限の一部です。

AI はプレイヤーの戦略に適応するのがあまり得意ではありません。プレイヤーが AI を悪用する方法を見つけた場合、AI はその過ちから学ぶことができなくなります。
AI は、環境を有利に利用することがあまり得意ではありません。たとえば、AI は物陰に隠れたり、プレイヤーを罠に誘ったりしません。
AI は共同作業があまり得意ではありません。敵ユニットは、たとえそれが彼らの最善の利益にならなくても、しばしば互いに攻撃します.
これらの制限にもかかわらず、シャイニング フォースの AI は、プレイヤーに挑戦を提供するのに十分効果的です。敵ユニットは攻撃的で、範囲外であってもプレイヤーのユニットを攻撃することがよくあります。これにより、特にプレイヤーが注意を怠ると、ゲームが難しくなる可能性があります。

ここにプロンプ​​トを入力してください
吟遊詩人は、Google の見解を表していない不正確または不快な情報を表示する場合があります。




profile picture
question about tv game. Please tell me how to implement Enemy's AI for turn-based SRPG .

Sure, here are some steps on how to implement enemy AI for a turn-based SRPG:

Define the enemy's goals. What does the enemy want to achieve? Do they want to defeat the player's units? Do they want to capture a certain objective? Once you know the enemy's goals, you can start to design their AI to achieve those goals.
Consider the enemy's abilities. What can the enemy do? What are their strengths and weaknesses? This will help you to determine how the enemy should behave in combat.
Design the enemy's AI. This is where you will put all of the pieces together. You will need to decide how the enemy will make decisions, how they will prioritize their targets, and how they will use their abilities.
Test the enemy AI. Once you have designed the enemy AI, you need to test it to make sure it is working as intended. You can do this by playing the game and seeing how the enemy behaves. You may need to make adjustments to the AI based on your testing results.
Here are some additional tips for designing enemy AI for turn-based SRPGs:

Make the enemy AI challenging but fair. The enemy should be a threat to the player, but they should not be unbeatable.
Give the enemy some personality. The enemy should not just be a mindless opponent. They should have their own goals and motivations, and they should behave in a way that is consistent with those goals.
Use the environment to your advantage. The enemy AI should be able to use the environment to their advantage. For example, they might try to hide behind cover, or they might try to lure the player into traps.
Keep the enemy AI unpredictable. The player should never be able to predict exactly what the enemy will do. This will keep the game challenging and exciting.
I hope this helps!

profile picture
do you know anything about AI used in "Shining Force" (genesis )
View other drafts














Sure. The AI used in Shining Force (Genesis) is a simple rule-based AI. This means that the enemy units make decisions based on a set of rules. For example, an enemy unit might have a rule that says "if an enemy unit is within range, attack it." The AI also takes into account the enemy unit's stats, such as its attack power and defense. This allows the enemy units to make decisions that are consistent with their abilities.

The AI in Shining Force is not very sophisticated, but it is effective enough to provide a challenge to the player. The enemy units are aggressive and will often attack the player's units even if they are out of range. This can make the game difficult, especially if the player is not careful.

The AI in Shining Force is a good example of how simple rule-based AI can be used to create a challenging and engaging game. The enemy units are not perfect, but they are able to provide a good challenge to the player. This is one of the reasons why Shining Force is considered to be one of the best tactical role-playing games of all time.

Here are some of the limitations of the AI in Shining Force:

The AI is not very good at adapting to the player's strategies. If the player finds a way to exploit the AI, the AI will not be able to learn from its mistakes.
The AI is not very good at using the environment to its advantage. For example, the AI will not try to hide behind cover or lure the player into traps.
The AI is not very good at working together. Enemy units will often attack each other, even if it is not in their best interests.
Despite these limitations, the AI in Shining Force is still effective enough to provide a challenge to the player. The enemy units are aggressive and will often attack the player's units even if they are out of range. This can make the game difficult, especially if the player is not careful.

Enter a prompt here
Bard may display inaccurate or offensive information that doesn’t represent Google’s views.