资源简介
爬山法 (Hill- climbing)搜索的算法,它是一个向值增加的方向持续移动的简单循环过程——也就是,登高。是一种最简单的启发式搜索算法, 它将最陡上升方向作为搜索方向, 因此能够以最快的速度爬到山顶。它将会到达一个“峰顶”时终止,相邻状态中没有比它更高的值。这种算法不维护搜索树,因此当前节点的数据结构只需记录当前的状态和它的目标函数值。爬山法不会前瞻与当前状态不直接相邻的那些状态的值,就像健忘的人攀登珠穆朗玛峰一样。

代码片段和文件信息
// Ba2.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “Ba2.h“
#include “Ba2Dlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CBa2App
BEGIN_MESSAGE_MAP(CBa2App CWinApp)
//{{AFX_MSG_MAP(CBa2App)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CBa2App construction
CBa2App::CBa2App()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CBa2App object
CBa2App theApp;
/////////////////////////////////////////////////////////////////////////////
// CBa2App initialization
BOOL CBa2App::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CBa2Dlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed return FALSE so that we exit the
// application rather than start the application‘s message pump.
return FALSE;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 28700 2014-01-11 10:09 Ba2(爬山最终版)\Ba2.aps
文件 1343 2014-01-11 10:13 Ba2(爬山最终版)\Ba2.clw
文件 2021 2013-08-07 11:59 Ba2(爬山最终版)\Ba2.cpp
文件 4176 2013-08-07 11:59 Ba2(爬山最终版)\Ba2.dsp
文件 531 2013-08-07 11:59 Ba2(爬山最终版)\Ba2.dsw
文件 1291 2013-08-07 11:59 Ba2(爬山最终版)\Ba2.h
文件 107520 2014-01-11 10:13 Ba2(爬山最终版)\Ba2.ncb
文件 53760 2014-01-11 10:13 Ba2(爬山最终版)\Ba2.opt
文件 240 2014-01-11 10:09 Ba2(爬山最终版)\Ba2.plg
文件 5814 2013-08-07 11:59 Ba2(爬山最终版)\Ba2.rc
文件 8921 2013-08-07 11:59 Ba2(爬山最终版)\Ba2Dlg.cpp
文件 1577 2013-08-07 11:59 Ba2(爬山最终版)\Ba2Dlg.h
文件 123009 2013-10-29 10:59 Ba2(爬山最终版)\Debug\Ba2.exe
文件 211864 2013-10-29 10:59 Ba2(爬山最终版)\Debug\Ba2.ilk
文件 14804 2013-10-29 10:59 Ba2(爬山最终版)\Debug\Ba2.obj
文件 394240 2013-10-29 10:59 Ba2(爬山最终版)\Debug\Ba2.pdb
文件 9716 2013-08-07 11:59 Ba2(爬山最终版)\Debug\Ba2.res
文件 39102 2013-10-29 10:59 Ba2(爬山最终版)\Debug\Ba2Dlg.obj
文件 105381 2013-08-07 11:59 Ba2(爬山最终版)\Debug\StdAfx.obj
文件 205824 2014-01-11 10:09 Ba2(爬山最终版)\Debug\vc60.idb
文件 364544 2013-10-29 10:59 Ba2(爬山最终版)\Debug\vc60.pdb
文件 3525 2013-08-07 11:59 Ba2(爬山最终版)\ReadMe.txt
文件 6966 2013-08-07 11:59 Ba2(爬山最终版)\res\11020K2D-23.bmp
文件 1078 2013-08-07 11:59 Ba2(爬山最终版)\res\Ba2.ico
文件 395 2013-08-07 11:59 Ba2(爬山最终版)\res\Ba2.rc2
文件 6966 2013-08-07 11:59 Ba2(爬山最终版)\res\wuzhecen-queen.bmp
文件 1094 2013-08-07 11:59 Ba2(爬山最终版)\resource.h
文件 205 2013-08-07 11:59 Ba2(爬山最终版)\StdAfx.cpp
文件 1054 2013-08-07 11:59 Ba2(爬山最终版)\StdAfx.h
目录 0 2014-01-14 09:32 Ba2(爬山最终版)\Debug
............此处省略5个文件信息
- 上一篇:stata estout
- 下一篇:基于混沌序列的水印技术
相关资源
- 基于MFC扩展CListCtrl子项显示图片并叠
- 黑白棋(带简单AI)
- MFC程序-碰撞的小球
-
Cme
taFileDC的使用示例 - ado数据库MFC图书管理系统vs2010
- mfc单文档窗体画线与写字
- [免费]MFC制作目录树
- MFC读三维模型obj文件
- 画图程序MFC/VC/VC CRectTracker 串行化
- MFC网络编程实例
- c 程序判断离散数学中命题公式
- MFC控件动态拖动
- MFC中OpenGL面和体的绘制以及动画效果
- c MFC 画多边形
- RSA AES DES ECC加密算法源码
- Microsoft基本类库 (MFC)(C 库)
- vc利用MFC底层开发的二维GIS管理软件,
- (MFC) 时钟日期程序
- 一个基于MFC的GridCtrl,提供类似Excel的
- 用MFC实现简单的画图功能
- MFC绘图小软件源代码(可当VC大作业用
- 基于MFC的文件目录树的对话框实现代
- VC 6.0 MFC做画图软件
- 空间后方交会MFC版,C 源代码
- 图像缩放(MFC)有详细的实现过程
- 一个mfc前端显示秒表
- 基于C 的简易FTP客户端(带源码)
- C (MFC)华容道自动求解
- VC 编程实现活动主机扫描源代码
- 在线考试系统VC (MFC)
评论
共有 条评论