迷你版阿尔法狗——基于"树莓派Pico"的五子棋AI对弈平台
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Pico相比于传统树莓派,更偏向<span style="color: black;">掌控</span>。本项目充分发挥其<span style="color: black;">掌控</span>,并结合传统树莓派生态<span style="color: black;">优良</span>,打造一个五子棋AI对弈平台:图像识别棋盘、PC通讯调用算法、IO口<span style="color: black;">掌控</span>机械结构下棋。该平台可用来学习AI算法、<span style="color: black;">设备</span>学习,<span style="color: black;">同期</span>兼顾对机械臂、摄像头等硬件外设的<span style="color: black;">运用</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">1、</span>概述</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">树莓派最新推出的Pico,基于其双核Arm Cortex M0+芯片RP2040。对比可<span style="color: black;">发掘</span>,这一颗芯片,相较于传统的树莓派,更偏向一个做<span style="color: black;">掌控</span>的MCU单片机,其丰富的外设IO,精巧的结构,很难让人相信这<span style="color: black;">亦</span>是树莓派系列。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">该项目的想法是想<span style="color: black;">明显</span>Pico的<span style="color: black;">掌控</span>性能,<span style="color: black;">同期</span>又继续发挥树莓派现有的优良生态环境的<span style="color: black;">优良</span>,放开胆子,两个方面的<span style="color: black;">优良</span>相结合。打造一个五子棋AI对战系统,即:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(1)图像识别五子棋盘;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(2)与PC通讯调用<span style="color: black;">关联</span>算法和库,计算下一步落子;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(3)Pico<span style="color: black;">经过</span>IO<span style="color: black;">掌控</span>机械结构,<span style="color: black;">安置</span>棋子,实现真正<span style="color: black;">道理</span>上的人机对弈。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">项目新意:</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">一方面,在软件编程上,<span style="color: black;">能够</span>基于该项目平台学习人工智能、深度学习<span style="color: black;">关联</span>的算法知识;另一方面,在硬件方面,<span style="color: black;">能够</span>学习IO<span style="color: black;">掌控</span>机械臂、调用摄像头等外设方面的硬件知识和技能。该项目软硬相结合,后续再<span style="color: black;">研发</span>、再学习的<span style="color: black;">潜能</span><span style="color: black;">很强</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">五子棋的算法较围棋简单,<span style="color: black;">亦</span>有较多现成的库可参考。该项目就相当于一个迷你版的阿尔法狗。听起来是不是很酷!</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">2、</span>技术路线</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1、图像识别</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">日前</span>摄像头初步计划<span style="color: black;">选择</span>:OV7670摄像头(FIFO)</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">该摄像头集成度高,调用很简单,且有<span style="color: black;">必定</span>的<span style="color: black;">实质</span>工程经验<span style="color: black;">做为</span>参考。该摄像头清晰度做图像识别<span style="color: black;">已然</span>足够。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在算法方面,采用较为成熟的Ganny算子边缘检测和图像灰度处理。鉴于Pico资源有限,<span style="color: black;">日前</span><span style="color: black;">思虑</span>Pico<span style="color: black;">做为</span>一个中继<span style="color: black;">或</span>是做初步处理的功能。<span style="color: black;">重点</span>算法<span style="color: black;">能够</span><span style="color: black;">经过</span>串口通讯将数据传递给PC端上位机,上位机计算后识别五子棋棋子坐标及其棋局<span style="color: black;">状况</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.下棋算法</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">下棋算法基于Python编程,发挥 Python强大的能力及生态。初步可调用现有的<span style="color: black;">有些</span>五子棋算法,实现基本功能。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">更进一步地,<span style="color: black;">能够</span><span style="color: black;">这里</span><span style="color: black;">基本</span>上,加入AI算法和深度学习,在PC端训练出一个五子棋AI,计算下一步落子。该过程可<span style="color: black;">研发</span>程度较高,后期可<span style="color: black;">很久</span><span style="color: black;">连续</span>的优化<span style="color: black;">研发</span>,可<span style="color: black;">做为</span>一个学习工具。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">最后</span><span style="color: black;">能够</span>实现对弈对手难道<span style="color: black;">选取</span>:简单、中等、困难、挑战AI等模式。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3.下棋执行</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">PC上位机计算得到下一步落子的位置坐标后,将信息<span style="color: black;">经过</span>串口传到Pico。Pico<span style="color: black;">经过</span>IO口<span style="color: black;">掌控</span>机械臂结构,在棋盘相应位置<span style="color: black;">安置</span>五子棋。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">为节省资源和<span style="color: black;">保准</span>落子的准确性,机械臂采用X-Y二维移动臂+<span style="color: black;">安置</span>臂两个结构<span style="color: black;">构成</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">X-Y二维移动臂采用2个步进电机,占用4个IO;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">安置</span>臂采用2个舵机,占用4个IO;</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/4569610a825245b5a43ecfdcf4e7973f~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1727395776&x-signature=VflsXliHvB5sukzSHLgDrdo4QEw%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">为<span style="color: black;">保准</span>落子的准确性,提前输入并校准棋盘各坐标的位置(棋盘各坐标对应平面X-Y轴两个步进电机的转动量)</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">如有必要,可采用摄像头辅助识别落子位置,<span style="color: black;">增多</span>落子准确性。形成闭环。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">3、</span>可行性与项目<span style="color: black;">优良</span>:</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.OV7670摄像头有<span style="color: black;">运用</span>经验,并有<span style="color: black;">海量</span>的现成资料;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.机械臂的<span style="color: black;">掌控</span>有项目经验可参考;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3.五子棋算法有较多可参考的算法和资料,以及有<span style="color: black;">关联</span>的五子棋算法库可<span style="color: black;">经过</span>Python调用。相<span style="color: black;">针对</span>围墙,五子棋算法简单,可学习性和实现性较强。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">4.Pico 的外设<span style="color: black;">掌控</span>丰富:30*GPIO管脚,16*PWM通道,足以实现<span style="color: black;">以上</span>的<span style="color: black;">掌控</span>方面的<span style="color: black;">需求</span>;树莓派及其基于microPython<span style="color: black;">研发</span>为算法的深度<span style="color: black;">研发</span><span style="color: black;">供给</span>了强大的生态和资源,是其他单片机不可比拟的。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">5.该项目平台打造之后,<span style="color: black;">亦</span>是一个深入软硬件学习的平台。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(1)硬件方面:学习IO、机械臂<span style="color: black;">掌控</span>(<span style="color: black;">掌控</span>舵机、步进电机);摄像头调用;串口通讯等<span style="color: black;">关联</span>硬件知识。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(2)软件方面:除了Pico的片上编程之外,还能学习上位机编程、Python编程、AI算法、<span style="color: black;">设备</span>学习等深度的软件编程知识。是一个人工智能的学习平台,<span style="color: black;">能够</span>用来<span style="color: black;">持续</span>训练和打磨五子棋AI模型。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这是一个迷你版的阿尔法狗,<span style="color: black;">同期</span><span style="color: black;">亦</span>是真正<span style="color: black;">道理</span>上和你面对面下棋的AI。</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/4e4ddaddb0cd4337ba1d47b585ee40b6~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1727395776&x-signature=QYnceZEGmgviZygRwAMUClDg4C8%3D" style="width: 50%; margin-bottom: 20px;"></div>
网站建设seio论坛http://www.fok120.com/ 感谢您的精彩评论,为我带来了新的思考角度。
页:
[1]