跳到正文
DEV Community· Christian Ahrweiler·· 1 小時前AI 評分45

AI 模型、AI 智能體,以及思考與行動的分別

AI — AI Models, AI Agents, and the Difference Between Thinking and Acting

AI 導讀

AI 模型提供學得的資訊或生成回應,AI 智能體則結合模型推理、規則和行動機制,逐步完成任務。6WINS 中,TAEL 評估棋盤局勢,ORACLE 搜尋三步並選擇落子;模型推理不會更新權重,訓練才會。ChatGPT 處理修正程式及執行測試等複雜要求時,也需要智能體循環執行操作、讀取結果並再次推理。

正文

What a Simple Board Game and ChatGPT Reveal About How AI Actually Works

*Simple Board Game and ChatGPT*When we talk about artificial intelligence, we often speak as if an AI model and an AI application were the same thing.

We say that AI makes decisions, solves problems, performs tasks, and sometimes even thinks.

But what exactly is doing all these things?

The neural network? The software surrounding it? Or the entire system working together?

To understand the distinction, we can start with something surprisingly simple: a board game.

A Neural Network That Doesn’t Know It’s Playing

I recently developed a strategy game called 6WINS. Two players place and slide pieces on a 9×9 board, trying to create a line of six.

The computer opponent uses a neural network that we train through repeated games.

We call the learning model TAEL, short for Try and Error Learning.

TAEL receives a numerical representation of a board position and produces a single value between −1 and +1.

Positive values indicate favorable positions. Negative values indicate unfavorable ones.

That’s all.

TAEL doesn’t know what a board game is. It doesn’t know the rules, which moves are legal, or what it means to place six pieces in a row.

It doesn’t even choose the next move.

It is a mathematical model that has learned relationships between board positions and game outcomes.

During training, completed games provide feedback. Positions associated with winning receive positive targets, losing positions negative targets, and draws a neutral target. The network’s weights are adjusted accordingly.

Importantly, this feedback describes the outcome of a game, not the quality of every individual move.

TAEL gradually learns to estimate how promising a position is.

But something else is needed to actually play.

Meet ORACLE, the Agent

The computer opponent is controlled by a separate component called ORACLE.

ORACLE knows the rules of 6WINS. It can generate legal moves, simulate their consequences, recognize immediate wins, and search ahead.

In our implementation, ORACLE searches three moves deep and selectively examines promising continuations.

To decide which positions look promising, it calls TAEL.

The process is straightforward:

  • ORACLE generates possible moves.
  • It simulates the resulting positions.
  • TAEL evaluates those positions.
  • ORACLE uses the evaluations within its search.
  • ORACLE selects and executes a move. One decision may involve many evaluations of the same neural network.

TAEL evaluates. ORACLE decides.

This is the distinction between a model and an agent in our game.

The model provides learned information. The agent combines that information with rules, search, and an action mechanism.

The agent can become more effective as the model improves, even though its search algorithm remains unchanged.

And the opposite is also true: a sophisticated search algorithm cannot guarantee good decisions if the model supplies poor evaluations.

We have seen both effects during development. With a freshly initialized model, our computer opponent sometimes placed pieces in the most peculiar locations. We jokingly nicknamed it Dalí.

As training progressed, it began winning occasional games against a conventional rule-based opponent.

But those victories did not mean the neural network had suddenly learned how to play the game by itself.

They were achieved by ORACLE using TAEL’s learned evaluations.

Model and Inference Are Not the Same Thing

There is another distinction that often gets overlooked.

A trained model and the execution of that model are not identical concepts.

The model consists of its architecture and learned parameters, commonly called weights.

Inference is what happens when we run that model on a particular input to obtain an output.

In our game:

Board position → TAEL inference → Numerical evaluation

During ordinary inference, the weights remain unchanged.

Training is different. Training measures errors and updates those weights to improve future predictions.

This matters because an AI system can perform millions of inference operations without learning anything new.

Our game makes the distinction especially visible.

During a move, ORACLE can call TAEL repeatedly to evaluate possible futures. These evaluations do not train the network.

Separately, after a completed training game, TAEL’s weights can be updated using the result.

Using a model is not the same as training it.

This distinction applies just as much to large language models.

From a Board Game to ChatGPT

Now consider a more familiar example.

You ask ChatGPT a question.

At the simplest level, a language model processes its input and generates an answer.

That involves inference.

But suppose the request is more complex:

“Find the bug in my program, fix it, and run the tests.”

A single model response is no longer sufficient to complete the task.

The system may need to inspect files, examine functions, modify code, execute tests, interpret failures, and try again.

This requires more than text generation alone.

It requires an agentic workflow.

A simplified version looks like this:

REQUEST → AGENT → MODEL INFERENCE → ACTION → RESULT → AGENT → … → REPLY

The user submits a request.

The agentic system provides context and instructions to the model. The model may generate a response or propose a tool action.

The surrounding software executes an authorized action and returns its result.

If a test fails, that result becomes new information for another inference step.

The system may then choose another action.

The cycle continues until the task is completed, reaches a stopping condition, or requires human intervention.

Only then is a final reply produced.

This is fundamentally different from asking a model a question once and displaying its output.

The Agent Loop

The crucial feature is the feedback loop.

Imagine the following sequence:

Request: Fix a Python script.

Inference: The model identifies a possible cause.

Action: The agent uses a tool to modify the script.

Result: The tests still fail.

Inference: The model analyzes the new error.

Action: Another correction is applied.

Result: The tests pass.

Reply: The agent reports what was changed and what was verified.

The important point is that the test result is not merely displayed to the user.

It can influence what the system does next.

This is why tools matter.

A language model can generate Python code as text. But generating code does not mean executing it.

A model can propose searching the internet. But proposing a search is not the same as retrieving and examining a source.

The surrounding system must provide the appropriate capabilities, permissions, execution environment, and controls.

Without them, the model may be capable of describing an action but incapable of carrying it out.

And even with tools, a successful action is not guaranteed. An agent can make incorrect decisions, misunderstand results, or stop before a problem is truly solved.

Not All Agents Work the Same Way

Our board-game agent and a tool-using language-model agent are not architecturally identical.

ORACLE uses a largely predetermined search procedure. Its neural network provides evaluations, but the surrounding algorithm controls the search.

In a language-model-based agent, the model may itself propose which tool to call, what arguments to supply, and what to attempt next.

The runtime still determines which actions are available and carries out the permitted tool calls.

This difference is important.

There is no universally accepted boundary defining exactly when software becomes an AI agent. Some definitions include rule-driven systems that observe an environment and select actions. Others reserve the term for systems in which a language model dynamically directs the workflow.

OpenAI and Anthropic, for example, describe agentic architectures with different levels of model-directed control.

But both perspectives make one thing clear:

The complete AI system cannot be understood by looking at the model alone.

Thinking, Acting, and Understanding

This brings us back to the title.

What is the difference between thinking and acting?

In technical descriptions of AI, thinking often refers informally to reasoning, planning, evaluating alternatives, or processing information.

Acting means producing an effect in an environment: executing a command, changing a file, sending a message, or placing a piece on a board.

The two are connected, but they are not the same.

A system can evaluate possibilities without taking action.

A system can also execute actions through a predetermined procedure without performing sophisticated reasoning.

And a system that appears to reason and act successfully does not thereby establish that it possesses consciousness or human-like understanding.

Our board game illustrates this particularly well.

TAEL does not understand the game in the human sense. It produces numerical evaluations.

ORACLE doesn’t need to understand its actions like a human player either. It follows its decision procedure and uses those evaluations to select moves.

Yet the combined system can play, defend, and occasionally win.

Successful behavior is something we can observe and measure.

What, if anything, that behavior tells us about understanding is a separate question.

Why This Distinction Matters

The difference between models and agents is more than technical terminology.

It affects how we evaluate AI products, how we understand their limitations, and how we assign responsibility for their actions.

If an AI agent makes a mistake, several different components may be involved.

The model might provide an incorrect evaluation.

The agent might choose an inappropriate action.

A tool might return incomplete information.

The software integrating those components might fail to validate a result or enforce an important restriction.

Simply saying “the AI made a mistake” tells us very little about what went wrong.

The same is true when a system succeeds.

Was the result produced primarily by the learned capabilities of the model, by a carefully engineered algorithm, by external tools, or by a combination of all three?

In practice, the answer is often the combination.

This distinction becomes increasingly important as AI systems move beyond answering questions and begin performing tasks on behalf of users.

A model may generate convincing instructions.

An agent may be able to execute them.

The difference is not just what the system can say, but what the system is permitted and able to do.

The Machine Behind the Answer

At the beginning, we had a simple neural network evaluating board positions.

Then we added a search engine, and the system could play a game.

Now consider a language model connected to files, programs, databases, and other tools.

The same architectural principle becomes much more consequential.

The model produces information or proposed actions. The surrounding system organizes their execution and handles the results.

Sometimes one inference is enough.

Sometimes a task requires many inferences, actions, and feedback cycles before a final reply is possible.

And throughout that process, the model’s weights may remain completely unchanged.

So the next time we read that an AI has solved a problem, written a program, or made a decision, perhaps we should ask a more precise question:

What did the model actually do — and what did the agent built around it do?

Understanding that difference tells us far more about artificial intelligence than treating everything as a single mysterious machine.

The Game: https://6wins.eu/

Sources and further reading

來源:DEV Community · dev.to