大班课作业三报告_周鑫渝_1700013222.pdf - 传教士与食人族问题报告 一、问题描述

大班课作业三报告_周鑫渝_1700013222.pdf -...

This preview shows page 1 - 2 out of 3 pages.

传教士与食人族问题报告 一、问题描述 状态 States : 用一个三元组( M L , C L , B L )表示的左岸传教士 、食人族人数和船是否在左岸 (1 表示在左岸 ) 其中传教士与食人族总人数人数均为 m ,船最多可承载 n 人。 初始状态 Initial state : 传教士 · 食人族和船均在左岸,用三元组表示为 ( m , m ,1) 动作 Actions : 船运载至多 n 人至对岸,且保证在任意地点传教士人数大于等于食人族人数(或者没有传教 士) 用三元组表示动作 action=± x,y,1 转移模型 Transition model : 执行动作后,新的左岸传教士、食人族人数和传是否在左岸,更新状态三元组 M L , C L , B L 目标测试 Goal test : 传教士、食人族和船均在右岸,( M L , C L , B L == 0 0 0 路径成本 Path cost : 每一次动作成本加一 二、算法伪代码 利用 BFS 算法
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 3 pages?

  • Spring '16
  • Bin Xie

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes