Nine Men‘s Morris

从骰子到算法:中世纪游戏设计对现代系统开发的启示 随机数生成器(RNG)和状态机是计算机科学和游戏开发中的基础概念。RNG通过算法模拟不确定性,为系统注入可控的随机性,是游戏机制、密码学及模拟仿真的核心。状态机则定义了系统在不同状态间的转换逻辑,是软件行为建模和流程控制的基石。这些技术的价值在于构建可预测又充满变化的动态系统,广泛应用于游戏玩法驱动、AI决策以及交互逻辑设计。本文以中世纪骰子和棋盘游戏为镜,探讨这些古老娱乐如何天然地封装了RNG驱动和有限状态机的原理,其简洁的规则层与社交层设计,为现代游戏系统与软件架构提供了关于核心循环清晰度与规则可扩展性 阅读详情

Nine Men’s Morris

Nine Men’s Morris is a two-player game played with counters on a board. It was popular in mediæval England, but has been played for over 2000 years. The game board consists of 16 lines, as follows:

在这里插入图片描述

The game is played in two stages:

The board starts with no counters on it, and each player starts with nine counters in their hand. Starting with player 1, they take it in turns to place their counters on unoccupied points on the board. If in placing a piece, a player manages to occupy all three points on a straight line with one of their counters (called forming a mill) then they may then remove one of their opponents counters from the board. (For example, in the diagram above, player 2, represented by , has such a mill, but player 1, represented by , does not). Such removed counters play no further part in the game. This continues until both players have placed all their counters.OX

Players continue to alternate turns. In a turn, a player moves one of their counters along a line to an adjacent unoccupied point. As before, if this move forms a mill, then the player removes one of their opponents counters from the board. A player loses if they are unable to move any of their pieces, or if they have only two counters left on the board.
在这里插入图片描述

Simulating the game in Python
The object of this coursework is to write a simulator for the game, which allows either two players to play each other.

The board
We’ll identify points on the board with integers 0 to 23 as follows:

The game state
The game state – that is, everything required to describe a game in play – consists of four elements:

The location and type of counters on the board
The number of unplaced counters that each player has in their hand
The player who taking a turn
We will store game state in a Python list containing four elements,g

g = [[…], p1_counters, p2_counters, active_player]
g[0] is itself a list of 24 integers, describing the board, with the th element of this list, describing what is present at point on the board. is:ig[0][i]ig[0][i]
0 if point is unoccupiedi
1 if point contains a counter of player 1i
2 if point contains a counter of player 2i
g[1] stores an integer containing the number of counters that player 1 has in hand (not yet placed on the board)
g[2] stores an integer containing the number of counters that player 2 has in hand (not yet placed on the board)
g[3] stores an integer, either 1 or 2, depending on whether the player currently taking their turn is player 1 or player 2, respectively.
A function draw_board() is provided that displays a board state to the console, using diagrams similar to those above. You may use this function as-is, as part of your program, or you may wish to modify it to improve the appearance of the board.

Asking the user for input
The game should interact with users only by asking for integer board locations, and a function is provided for this purpose.request_location(question_str)

This function

displays the parameter string that is passed to it, as a prompt to the userquestion_str
waits for the user to type an integer
either: -returns this integer, if it corresponds to a location on the board (between 0 and 23 inclusive)
or raises a ValueError if the text typed was not an integer
or raises a RuntimeError if the text typed was an integer, but not in the range 0 to 23 inclusive.
The request_location function is the only way in which you should ask the user for input. You must not modify this function, and you must not use the input(…) function anywhere else in your code. (The reason for this is that, when testing the code, I may modify the request_location function to automate the user input to your program). Using the function anywhere else in your code will result in the loss of marks.input(…)

The tasks:
The following tasks each ask you to write a Python function that forms some part of the game. Generally speaking, the earlier tasks are easier than the later tasks. It is expected that you will call some of the functions from earlier tasks in the later tasks. Unless otherwise specified, functions do not return a value.

The function definitions are already defined in the template code provided. Use this template, and fill in the implementation of the functions.
For each function, write a short docstring (~ 1-3 sentences) that explains what the function does, what parameters it takes, and what it returns (if anything).
Document each of your functions using comments () to explain what the code is doing. On average, I suggest writing one comment line for every ~5 lines of code, though this varies greatly depending on the code being written#
Task 1: checking adjacency (4 marks)
Write a function that takes two integers representing points on the board, and returns the Boolean value if those two points are adjacent to one another (connected by a line without going through another point), or otherwise. A point is not adjacent to itself. For example should return , and and should both return .is_adjacent(i, j)TrueFalseis_adjacent(21,22)Trueis_adjacent(21, 23)is_adjacent(21,20)False

You can assume that the values of and provided are integers between 0 and 23 inclusive.ij

Task 2: setting up the game state (4 marks)
Write a function that returns the game state (the list of four elements, as described above), for a new game in which no counters have been placed.new_game()

Task 3: counting counters (4 marks)
Write a function that takes a game state and returns an integer containing the total number of counters that the current player () has available. This is the sum of the number of counters the player has in hand (yet to place on the board) and the number of counters they have on the board.remaining_counters(g)gg[3]

Task 4: checking for mills (6 marks)
Write a function that takes a game state and an integer index of a point . The function should return:is_in_mill(g, i)gi

-1 if is outside the range 0-23 inclusive, or if there is no counter at point ii
0 if the counter at point is not in a mill,i
1 if the counter at point belongs to player 1 and is in (one or more) millsi
2 if the counter at point belongs to player 2 and is in (one or more) millsi
Task 5: checking if the player can move (4 marks)
Write a function that returns if the current player has a valid move to make, or if they do not. A player has a valid move if they have one or more counters left in their hand, or if not, if any of their counters on the board are next to an adjacent unoccupied space.player_can_move(g)TrueFalse

Task 6: placing a counter (4 marks)
Write a function that places a counter of the currently active player at point on the board. The function should raise a if there is already a counter at this location. The function should update the game state to place the counter on the board, and decrement the number of counters that the current player has in their hand.place_counter(g, i)iRuntimeErrorg

You can assume that will be an integer between 0 and 23 inclusive, and that this function is only called if the active player has at least one counter in their hand.i

(Hint: Recall that changes to the game state g inside this function will be visible outside the function too, because g is a list. This is the desired behaviour and the functions in this and subsequent tasks should update the game state that is provided to them (and not return a new game state). You should not attempt to make a copy of the game state.)

Task 7: moving a counter (4 marks)
Write a function that moves a counter of the currently active player from point on the board to the adjacent point . The function should raise a if this move is not possible, namely if points and are not adjacent, if point doesn’t contain a counter of the current player, or if there is already a counter at point . The function should update the game state to reflect the moved counter.move_counter(g, i, j)ijRuntimeErrorijij

You can assume that and will be an integers between 0 and 23 inclusive.ij

Task 8: removing an opponent’s counter (4 marks)
Write a function that takes a game state and point and removes the counter at point on the board. The function succeeds if the point is occupied by a counter of the opposing player (i.e. the player who is not the current player), and raises a otherwise.remove_opponent_counter(g, i)giiiRuntimeError

Task 9: taking a turn (8 marks)
Write a function that simulates taking a turn of the game. This function takes a game state and should do five things in sequence:turn(g)g

Check whether the current player is unable to move or has otherwise lost the game, and return if so, without modifying .Falseg

If the current player has one or more counters in hand,

ask the player for a location to place a counter on the board using ,request_location
update the game state to place this counterg
If the player gives an invalid location, or the placement is not possible under the rules of the game, the player should be prompted to enter the location again, until a valid placement is made.

otherwise, the current player has no counters in hand, so,

ask the player for the location of a counter to move using ,request_location
ask the player for a location to move said counter to, again using .request_location
update the game state to move this counterg
If the player gives invalid location(s), or the move is not possible under the rules of the game, the player should be prompted to enter both the locations again, until a valid move is made.

If the play in step 2 has formed a mill, ask the player for the location of an opposing counter to be removed, and update the game state to remove this counter. As before, if an invalid location is given, the player should be re-prompted until a valid location of an opposing counter is provided.g

Update the game state to switch the current player.

Return to indicate that the game is not over yetTrue

At appropriate points during the turn, you should display the board, using the provided function, or otherwise.draw_board()

Task 10: saving and loading a game state (8 marks)
Write a function that saves the game state to a text file, and a function that returns a game state loaded from a text file. In both cases, the filename is given in the string .save_state(g, filename)gload_state(filename)filename

Both functions should raise a if the file cannot be saved/loaded.RuntimeError

The file format for both functions is the same, so that the code

save_state(g, ‘my_file.txt’)
g_new = load_state(‘my_file.txt’)
reloads the same game state that has just been saved, and is equal to .g_newg

The text file used by both functions has four lines, in the following format:

The first line of the file contains the board state , stored as integers from to , separated by spaces and commas, as follows … etc. There is no comma after the final number .g[0]g[0][0]g[0][23]0, 2, 1, 0,g[0][23]
The second line of the file contains a single integer, the value of g[1]
The third line of the file contains a single integer, the value of g[2]
The fourth line of the file contains a single integer, the value of g[3]
Task 11: playing a game
Write a simple function that creates a new game state and repeatedly calls to simulate an entire game. Once the game is over, display some text to congratulate the winner.play_game()gturn(g)

The function is assessed by hand, rather than by automated testing.play_game

How this coursework will be assessed
This coursework is worth 70 marks, and 70% of the course overall.

50 marks are for correctness of the functions defined in tasks 1-9. These will be tested in an automated way, as in the previous courseworks. The number of automatically assessed marks for each task 1-10 is shown above.

8 marks will be for the overall quality of experience of a player playing the game in Task 11. This will be assessed by humans, and will be based on:

Correct behaviour of the functionplay_game
Clear display of the board at appropriate points in the game
Clear prompts to the players throughout the game, for example when positions on the board are being requested
Appropriate handling of errors and clear error messages when invalid input is provided
12 marks will be for the quality of the code. This will be assessed by humans, and will be based on:

Clarity and precision of docstrings for each function
Clarity of comments elsewhere in the code that describe what the code is doing
Code quality. Code should be clear, efficient and easy to maintain. Marks may be lost for
Very inefficient algorithms
Code that is unnecessarily verbose or difficult to understand
Unnecessary duplication of code
The model answer to coursework 2, to be released during week 9, provides an example of good quality code, comments and docstrings


def place_counter(g, i):
    """
     places a counter of the currently active player at point on the board.
     The function should raise a if there is already a counter at this location.
     The function should update the game state to place the counter on the board,
     and decrement the number of counters that the current player has in their hand.
    """
    if g[0][i] != 0:
        raise RuntimeError("There is already a counter at this location")
    # Set the point to the current player's counter
    g[0][i] = g[3]
    # Decrement the counter from the player's hand
    g[g[3]] -= 1


def move_counter(g, i, j):
    """
    moves a counter of the currently active player from point on the board to the adjacent point .
    The function should raise a if this move is not possible, namely if points and are not adjacent,
    if point doesn't contain a counter of the current player, or if there is already a counter at point
    The function should update the game state to reflect the moved counter.
    """
    # Check if the specified points are adjacent and valid
    if not is_adjacent(i, j) or g[0][i] != g[3] or g[0][j] != 0:
        raise RuntimeError("Invalid move: cannot move the counter to this location")

    # Move the counter from point i to point j for the current player
    g[0][i] = 0
    g[0][j] = g[3]


def remove_opponent_counter(g, i):
    """
    Takes a game state and point and removes the counter at point on the board.
    The function succeeds if the point is occupied by a counter of the opposing player
    (i.e. the player who is not the current player), and raises a otherwise
    """
    # Check if the specified point contains an opponent's counter
    if g[0][i] != 3 - g[3] or g[0][i] == 0:
        raise RuntimeError("Invalid move: no opponent's counter to remove at this location")

    # Remove the opponent's counter from the specified point
    g[0][i] = 0


def turn(g):
    """
    Simulates taking a turn of the game.
    1. Check whether the current player is unable to move or has otherwise lost the game, return false.
    2. If the current player has one or more counters in hand,
        ask the player for a location to place a counter on the board using request_location
        update the game state to place this counter
    If the player gives an invalid location, or the placement is not possible under the rules of the game,
    the player should be prompted to enter the location again, until a valid placement is made.
    otherwise, the current player has no counters in hand, so,
        ask the player for the location of a counter to move using request_location
        ask the player for a location to move said counter to, again using request_location
        update the game state to move this counter
    If the player gives invalid location(s), or the move is not possible under the rules of the game,
    the player should be prompted to enter both the locations again, until a valid move is made.
    3. If the play in step 2 has formed a mill,
    ask the player for the location of an opposing counter to be removed,
    and update the game state to remove this counter. As before, if an invalid location is given,
    the player should be re-prompted until a valid location of an opposing counter is provided.
    4. Update the game state to switch the current player.
    5. Return to indicate that the game is not over yet True
    At appropriate points during the turn, you should display the board,
    using the provided function, or otherwise.draw_board()
    """
    # Check if the current player has lost the game or unable to move
    if not player_can_move(g):
        return False

    # Get the current player and display the board
    current_player = g[3]
    draw_board(g)

    # Check if the current player has counters in hand to place on the board
    if g[current_player] > 0:
        while True:
            try:
                location = request_location(f"Player {current_player}, place a counter (0-23): ")
                place_counter(g, location)
                # If the play has formed a mill, ask the player for the location of an opposing counter to be removed
                if is_in_mill(g, location):
                    while True:
                        try:
                            remove_location = request_location(
                                f"Player {current_player}, choose an opponent's counter to remove: ")
                            remove_opponent_counter(g, remove_location)
                            break
                        except RuntimeError as e:
                            print(e)
                            continue
                break
            except RuntimeError as e:
                print(e)
                continue
    else:
        # Ask the player for the location of a counter to move
        while True:
            try:
                start = request_location(f"Player {current_player}, select a counter to move (0-23): ")
                end = request_location(f"Player {current_player}, move the counter to (0-23): ")
                move_counter(g, start, end)
                # If the play has formed a mill
                if is_in_mill(g, end):
                    while True:
                        try:
                            remove_location = request_location(
                                f"Player {current_player}, choose an opponent's counter to remove: ")
                            remove_opponent_counter(g, remove_location)
                            break
                        except RuntimeError as e:
                            print(e)
                            continue
                break
            except RuntimeError as e:
                print(e)
                continue

    # Switch the player after the turn
    g[3] = 3 - current_player
    return True


def save_state(g, filename):
    """
    The first line of the file contains the board state
    The second line of the file contains a single integer, the value of g[1]
    The third line of the file contains a single integer, the value of g[2]
    The fourth line of the file contains a single integer, the value of g[3]
    """
    with open(filename, 'w', encoding='utf-8') as file:
        file.write(','.join(map(str, g[0])) + '\n')
        file.write(str(g[1]) + '\n')
        file.write(str(g[2]) + '\n')
        file.write(str(g[3]))


def load_state(filename):
    """
    g_new = load_state('my_file.txt')
    """
    loaded_state = []

    # Open file
    with open(filename, 'r', encoding='utf-8') as file:
        # Read each line from the file and append it to the loaded_state list
        for line in file:
            loaded_state.append(list(map(int, line.strip().split(','))))

    return loaded_state


def play_game():
    """
    Creates a new game state and repeatedly calls to simulate an entire game.
    Once the game is over, display some text to congratulate the winner.
    """
    # Start a new game
    game_state = new_game()

    while True:

        game_over = not turn(game_state)
        draw_board(game_state)

        # If the game is over, display the winner
        if game_over:
            winner = 3 - game_state[3]  # the winner is the current player
            print(f"Player {winner} wins!")
            break
Pandas入门教程(二十二):股票数据分析实战——yfinance 获取数据、技术指标与收益率分析 把 Pandas 用在真实场景,才能体会它的价值。本文以茅台股票为例,用 yfinance 获取历史行情,完成缺失值处理与列筛选,绘制收盘价曲线,计算 SMA 移动平均线与 RSI 相对强弱指数,并通过日收益率、累计收益率和波动率完成完整的量化分析流程。 阅读详情

相关推荐

如何处理动态语言(Python / JS)的“隐形”调用链?

本文揭示动态语言(Python/JS)中静态AST解析导致调用链“断链”的核心问题,提出通过运行时追踪补全图谱的解决方案。基于Code-Graph-RAG的cgr trace机制,分别利用pytest插件与V8 Profiler捕获真实调用路径,将动态边合并至静态图谱,并在权重体系中提升动态边优先级。实践表明,该方法可显著提升图谱覆盖率,实现“结构+行为”双视角理解代码,为MCP与Rerank系统提供可靠支持。

xianyinsuifeng的博客 406

QT做的成三棋、打三棋、九连棋、莫里斯九子棋应用程序及其源码

古老的游戏 莫里斯九子棋 九子棋(Nine Men's Morris)是一个非常古老的智力的游戏。其历史甚至可以追溯到公元前1400多年的古埃及时代。 棋盘有24个格点,对弈双方各有九个棋子,轮流下到棋盘的空位上。 如果一方有三个棋子连成一线,就可以选择吃掉对方的一个棋子。被吃的棋子不可以是位于对方所形成的三连之内,除非对方所有棋子都形成了三连。 在九个棋子都布放到棋盘上以后,可以沿...

liuweilhy的博客 8131

九子棋 (Nine Men's Morris)

可以玩的java九子棋游戏,支持网络对战,支持单机游戏。

AI全栈实战 | 3.9-01 爬虫入门:requests 加 BeautifulSoup 三分钟跑通,但 90% 的人栽在这 4 个“礼貌“问题上

⚠️:本文内容仅用于。请遵守目标站点的服务条款与相关法律法规,不得对目标服务造成负担,不得采集、传播个人隐私数据。技术是中性的,边界在你手里。爬虫的入门技术(requests 发请求 + BeautifulSoup 解析)三分钟就能学会。真正区分"会用爬虫"和"会做爬虫的人"的,是这篇我们跑通"请求→解析→存储"的最小闭环,然后重点把"合规与礼貌"这根弦给你绷上。

源码获取 | 运行部署 | 定制二开修改,如果回复不及时请耐心等待,请见谅。 406

NineChess九连棋(成三棋,morris九子棋)

成三棋、九连棋、莫里斯九子棋的源码。GUI框架Qt5,在Windows 10和Deepin Linux平台下编译通过。详细介绍请看本人博客及开源项目首页。

Error relaunching VirtualBox VM process:5错误解决

前几天在重新使用VirtualBox的时候出现了一个挺恶心的错误,如图 百度了好久没有找到合适的解决方法。功夫不负有心人,在查阅了vb相关论坛时发现了大牛对此问题的诸多解决方案。下面我把此论坛的内容总结一下,希望对大家有帮助。 论坛链接:Diagnosing VirtualBox Hardening Issues 时间不足的小伙伴可以直接看 解决方法 造成这个错误的主要原因是,windows操作系统与oracle vb的不兼容。有两个方面,一是非官方windows系统中包含了一些没有签名的d

JaCenz的博客 3万+

从一段视频到可漫游的 4D 有声场景:思路拆解与最小复现手记

只需一段手机视频,你就能生成可"走进去"的 4D 有声场景:转头时狗叫声方向随之变化,走近时声音更清晰。本文拆解 Video-to-4DAVScene 的核心思路,手把手带你用几十行 Python 搭出最小管线,把视频中的运动物体变成带空间位置的声源,并附上三个真实踩坑的排障经验,代码可直接跑。🎧

helloagent的博客 235

CentOS 7下Oracle 11G RAC静默安装避坑指南:从网络规划到共享存储配置全流程

本文详细介绍了在CentOS 7环境下进行Oracle 11G RAC静默安装的全流程,包括网络规划、共享存储配置和系统参数调优等关键步骤。特别针对静默安装过程中的常见问题提供了实用的避坑指南和优化建议,帮助技术人员高效完成企业级数据库部署。

weixin_29234509的博客 124

【每天一个 Python 小案例30】Python 基础知识综合小项目:我的工具盒

作为系列收官,本篇把前 29 篇的知识点合成一个能直接用的命令行工具"我的工具盒":计算器(用 ast 解析表达式,不碰 eval)、单位换算与温度转换(一张换算表 + 特例分支)、记账与分类统计(Decimal + JSON 持久化)、以及用"字典当命令表"把菜单和业务逻辑解耦的主循环。文中对比了 eval 的安全隐患与 ast 白名单的做法,解释了 lambda 闭包在字典里的写法与晚绑定陷阱,并在最后给出整个系列的知识地图,把变量、数据结构、控制流、函数、类、异常、文件、标准库八块内容对应到具体篇目。

xinjiyaya的博客 426

Python实战:用MNE-Python从脑电数据中提取P300成分(附完整代码)

本文提供了一份使用MNE-Python从脑电数据中提取P300成分的完整实战指南。通过详细的代码示例,系统讲解了从环境搭建、数据加载、预处理(滤波、分段、伪迹剔除)到P300波形提取、可视化与参数量化的全流程。重点介绍了如何利用零相位滤波和叠加平均技术,从EEG信号中精准分离出反映认知加工的P300事件相关电位,适用于脑机接口与认知神经科学研究。

weixin_29240343的博客 338

Ubuntu下Charm-Crypto安装

经过一下午的努力终于是把Charm-Crypto给安上了,经过查询资料,大致有三种方案(两坑一可行)。 适用于我的电脑的是Ubuntu 18.04版本。 第一种方案是根据连接https://pypi.org/project/charm-crypto/的教程进行安装,但是该方案的优势在于下载快速,缺陷在于Ubuntu系统仅仅更新到13+版本。 第二种就是网络博客上的介绍,内容与第一种较类似,但是有16+,18+成功的例子,缺点就是bug太多,我大部分时间都耗在了这上边,而且还没有成功。 第三中是github上

Mr.Yi的博客 2284

详解Python条件语句

在 Python 中,if...else 是一种条件语句,可以根据给定的条件执行不同的操作。这个语句通常用于控制程序的流程。

2601_96798737的博客 207

数控系统(CNC)系列:Hurco VMX42SR_(3).控制系统硬件组成部分

控制箱是CNC系统的核心部分,负责处理所有的控制指令和数据。它通常包含主控板、电源模块、接口板等关键组件。伺服驱动器是CNC系统中的关键组件,负责将主控板发出的控制信号转换为电机所需的驱动电流。它通过闭环控制确保电机的精确运动。电机是CNC系统中的执行机构,负责实现主控板发出的运动指令。常见的电机类型包括步进电机和伺服电机。传感器是CNC系统中的重要组件,用于检测和反馈机床的运行状态。常见的传感器类型包括位置传感器、速度传感器、温度传感器等。电源供应系统为CNC系统的所有组件提供电力。主电源。

2401_87715305的博客 1279

Python3 协程:异步编程的核心机制与实战

协程是解决I/O密集型任务等待瓶颈的高效机制,相比线程更轻量、无锁开销。从yield到async/await的演进,使异步编程语义清晰、易于理解。通过async/await可实现并发执行多个任务(如gather、create_task),显著提升网络请求、爬虫等场景性能。关键在于使用异步库(如aiohttp)替代同步库,避免阻塞事件循环。合理控制超时与并发数,才能发挥协程最大优势。

Lxn2zh的博客 159

078、镜头阴影校正:LSC算法原理与标定优化

文章摘要 镜头阴影校正(LSC)是手机影像系统中的关键技术,用于解决镜头渐晕效应导致的画面边缘暗角问题。本文详细分析了LSC算法的核心原理,包括非均匀网格划分、双线性插值等关键技术点,并揭示了标定流程中的常见陷阱(光源均匀性、灰卡反射特性、温度漂移)。文章还深入探讨了增益计算的工程实现细节,以及实际调优中的关键考量因素(色差校正、动态场景适应等)。作者结合15年经验,给出了包括验证方法、网格参数设计、产线标定等实用性建议,强调LSC算法应与光学设计协同优化,才能达到最佳效果。

sundong_81的博客 42

芒果YOLOv12改进13:独家原创改进最新 CFNet 核心结构|即插即用 | 首发改进显著提升检测性能,小目标检测涨点必备

芒果YOLOv12改进13:独家原创改进最新 CFNet 核心结构|即插即用 | 首发改进显著提升检测性能,小目标检测涨点必备

包括YOLOv5、YOLOv7、YOLOv8等模型改进 288

torch.compile 差异仅 1e-6,边界样本预测为何翻转

torch.compile 加速后输出与 eager 不一致,部分预测翻转。逐层对比与 graph break 分析定位到动态分支翻转根因。容差回归仅适用于无分支翻转场景,零容忍场景应禁用编译。

昨日种种,皆成今我。今日种种,皆成新我。 159

基于STM32的智能浇花系统毕业设计(全部资料)

摘要:本文设计了一种基于STM32单片机的智能浇花系统,集成了环境温湿度检测、土壤温湿度监测、LCD显示、Wi-Fi联网及手机APP远程控制等功能。系统通过传感器实时采集环境参数,自动控制水泵工作实现智能灌溉,同时支持用户通过手机APP远程监控和调节。论文详细阐述了硬件选型、软件设计及系统测试过程,验证了系统的稳定性和实用性。该设计为家庭园艺提供了智能化解决方案,具有节水高效、操作便捷等特点。关键词:STM32;智能灌溉;远程控制;环境监测;Wi-Fi通信。

3254968421的博客 1195

二进制木马免杀-Python 分离免杀与 Web 挂马

二进制木马免杀-Python 分离免杀与 Web 挂马

2503_94637398的博客 268

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

蓝桥杯·全国青少年信息素养大赛·电子学会Python/C++考级 备考:莫队算法离线区间查询详解

备赛进行时:第十八届蓝桥杯软件赛报名已于 2026-10-08 10:00 开启、12-18 14:00 截止,省赛定在 2027-04-10(C/C++·Python 程序设计 9:00–13:00);中国电子学会 2026 年 12 月软件编程(C/C++ 一级至十级、Python 一级至六级)考级报名 9/23–12/2 16:00、统考 12-12;全国青少年信息素养大赛 2026—2027 赛季算法应用主题赛也已进入复盘练兵窗口。

IT_Scratch的博客 137

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

【Python】国家中小学智慧教育平台电子教材批量下载与 PDF 合成实战

成果:两本语文电子课本(一年级上册 118 页 / 23MB、三年级上册 130 页 / 30.3MB),合计 248 页、约 54MB,单本下载加合成 40~60 秒,PDF 页数校验全部通过。经验教训SPA 站点的数据接口优先从 bundle 里挖,比抓页面稳得多;资源链接要按 private/public 分组看待,只取平台公开部分;页数、目录名这类“可推断”的信息,永远用实际响应验证一次;受限环境里“能不能跑浏览器”要在方案定稿前确认。后续计划:这版 PDF 是图片版,没有文字层;

木头大左的博客 137

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

魔塔社区微调训练Qwen2-1.5B-Instruct模型并烧录到‌RK3568开发板教程

本文基于Ubuntu 22.04 + CUDA 13.0.3环境,使用LLaMA-Factory框架对Qwen2-1.5B-Instruct模型进行LoRA微调,训练儿童故事生成专用模型。通过配置qwen模板、制作alpaca格式数据集、执行sft训练并合并LoRA权重,最终将模型转换为GGUF格式,并量化为Q4_K_M以适配RK3568嵌入式平台。全程支持国产镜像加速下载与显存优化,实现高效轻量化部署。

浅清秋慕夏的博客 186

【回眸】DeepSeek V4.1 Flash 快速上手与实战

本文介绍如何高效本地部署开源大模型,通过现代化工具链实现分钟级环境搭建。聚焦显存优化、一键安装、代码调用与多轮对话实现,解决“显存不足”“连接超时”等痛点,提供参数调优与结构化输出技巧,助力开发者在离线场景下快速构建稳定、高效的本地推理系统。

啤酒鸭的物联网开发记录博客 223

智叟云集-手机证据抓取系统的工程结构与应用入口

本文系统阐述手机证据抓取系统的工程结构与应用入口,涵盖四大层面:工程目录划分(Android、Python服务、Web页面、测试与构建工具);Android组件通过Manifest声明可启动页面,主界面由MainActivity管理;Python服务通过run.py解析参数并启动FastAPI应用,支持远程访问;浏览器页面采用HTML/CSS/JS分离架构,静态资源通过路径关联,实现动态交互。各模块分工明确,协同构建可运行的采集系统。

2301_77178996的博客 232

Java Arrays.asList 常见坑详解|UnsupportedOperationException、数组联动、基本类型 bug

解析 Arrays.asList 常见开发陷阱,演示 UnsupportedOperationException、底层数组引用共享、基本类型数组问题,区分 Arrays 内部 ArrayList 与 java.util.ArrayList,给出数组转 List 的各种场景正确代码。

weixin_42617033的博客 473

利用python中matplotlib.pyplot库绘制图

plt.plot(x,y) # x,y是每个点的坐标,plot()把每个点按顺序画折线。plt.subplots(2,2)表示绘制2*2的子图布局,axs[0,0]表示在第0行第0列绘制子图...coordinates_i[:,0]表示获取每一行(每一个spot)的第0列(x坐标)coordinates_i[:,1]表示获取每一行(每一个spot)的第0列(y坐标)plot.subplot(2,2,1) 表示子图布局是2*2的,开始绘制第一个。也可以导入数据绘制。可以设置color属性,设置颜色。

qq_46147236的博客 102
上一篇: Understanding Players’ Environmental Perception in a Game Environment
下一篇: Baking Information System
todcode
博客等级 码龄7年 359粉丝 108原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值