-
Prolog实现8-puzzle
he 8-puzzle will be represented by a 3x3 list of lists positions where the empty box will be represented by the value 9, as shown below: [[9,1,3],[5,2,6],[4,7,8]]
Possibility Solution: Only half of the initial positions of the 8-puzzle are solvable. There is a formula that allows to know from the beginning if you can solve the puzzle.To determine whether an 8-puzzle is solvable, for each square containing a value N is calculated how many numbers less than N there after the current cell. For example, to the initial status
- 2023-07-26 11:40:02下载
- 积分:1
-
检查括号是否匹配
用于检查括号是否匹配,包括大括号,中括号和小括号,并能返回括号匹配数
- 2023-01-09 18:50:03下载
- 积分:1
-
基本粒子群算法
本代码为基本粒子群算法,通过修改适应值函数,可以应用于多个领域,比如电力系统的相关参数的优化设置,如陷入局部最优,需引入变异函数,通过重置某一维的数值,使粒子脱离局部最优。
- 2023-08-24 07:20:03下载
- 积分:1
-
数组/矩阵类模板
用matrix A(8,10) 定义数组,就可以像在matlab里一样引用数组元啦!
- 2023-07-14 12:55:03下载
- 积分:1
-
模拟退火算法解决TSP旅行商问题和车辆配送路径优化
用固体退火模拟组合优化问题,将内能E模拟为目标函数值f,温度T演化成控制参数t,即得到解组合优化问题的模拟退火算法:由初始解i和控制参数初值t开始,对当前解重复“产生新解→计算目标函数差→接受或舍弃”的迭代。由多辆车对一批货物进行配送,车辆存在容积的限制,而不同的客户间的距离适用于旅行商问题,故此用模拟退火的思想来解决车辆配送和路径选择之间的关系
- 2022-03-22 09:14:07下载
- 积分:1
-
matlab图像处理大全
全面,可用,可视化界面.
1. 图像几何运算
(1) 对图像进行缩放、旋转等几何操作
(2) 对比采用不同的插值法的效果
请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2023-03-28 18:15:04下载
- 积分:1
-
数据结构-算法-C语言-Demo
#ifndef _BINARY_TREE_H_INCLUDED#define _BINARY_TREE_H_INCLUDED#include #include templatestruct Bintree_node {T element;Bintree_node* lchild;Bintree_node* rchild;explicit Bintree_node(const T& elem=T(), Bintree_node* lchd=0, Bintree_node* rchd=0): element(elem), lchild(lchd), rchild(rchd) {}};templateclass Binary_tree {public:typedef Bintree_node* PBtn;Binary_tree();virtual ~Binary_tree();void clear();int depth() const;int size() const;virtual PBtn find(const T& elem) const=0;virtual void insert(const T& elem)=0;virtual void erase(const T& elem)=0;virtual void print(std::ostream& output) const=0;void print_tree(std::ostream& output) const;protected:
- 2022-01-29 04:39:50下载
- 积分:1
-
实现网上流行的逐行广告滚动,即一定秒数滚动一行,并非线性滚动.改良后,可以由文字的滚动做成图片逐行滚动,每行可以有若干条...
实现网上流行的逐行广告滚动,即一定秒数滚动一行,并非线性滚动.改良后,可以由文字的滚动做成图片逐行滚动,每行可以有若干条-Realize the popular progressive online advertising rolling, that is, a certain number of seconds a rolling line, and non-linear scroll. Improvement can be made by the text of the scroll line by line scrolling picture, each line can have a number of articles
- 2023-05-03 21:50:04下载
- 积分:1
-
使用递归实现的快速排序法
使用递归实现的快速排序法-Quick sort using recursive
- 2022-08-04 11:35:02下载
- 积分:1
-
伊辛模型 Python
"伊辛模型是一个铁磁体的简化版本 - 其中所述材料的结构包括每晶格位置的单个偶极子的,是一个简单的示范精美的统计力学和相变的影响 - 以及一个作为一个奇妙例子蒙特卡罗模拟的能力。“。这个程序做数值模拟在python这个模型中,打开该文件,并读取的注释 (法国) 但所有这解释,在 python 的数值模拟。
- 2022-04-12 18:30:22下载
- 积分:1