# [Algorithms]Calculator Stack

keywords：计算器代码、Calculator #include "stdio.h" #include "string.h" #define MAX 1001 double stack[MAX]; int tail; int main(){ int a; while(scanf("%d ",&a)&&a!=0){ tail=0; stack[++tail]=1.0*a;//tail始终指向末尾数字位置 //1.入栈所有数据（如果遇到*/号，只更新栈尾） char ch1,ch2; while(scanf("%c %d%c",&ch1,&a,&ch2)!=EOF){ if(ch1=='+'){ stack[++tail]=1.0*a;//push }else if(ch1=='-'){ stack[++tail]=-1.0*a;//push neg }else if(ch1=='*'){ stack[tail]=stack[tail]*a;//update tail }else if(ch1=='/'){ stack[tail]=stack[tail]/(double)a;//updata tail } if(ch2!=' ') break; } //2.把栈里头的东西全部加起来，求和 double result=0; for(int i=1;i<=tail;i++) result+=stack[i]; printf("%.2lf\n",result); } return 1; } 原文：https://blog.csdn.net/JIEJINQUANIL/article/details/51405381

# [Algorithms]StarCraft 2's AI Algorithm

keywords：Pathfinding、Rush AI、Flocking AI、Swarm AI、Fish AI、 相关博客 The StarCraft BroodWar Resource for custom AIs http://www.starcraftai.com/wiki/Main_Page How does StarCraft II’s pathfinding algorithm work? https://www.quora.com/How-does-StarCraft-IIs-pathfinding-algorithm-work pathing 6 - flocking http://satirist.org/ai/starcraft/blog/archives/68-pathing-6-flocking.html STARCRAFT 1 PATHFINDING: A TECHNICAL ANALYSIS http://striketactics.net/devblog/starcraft-1-pathfinding-technical-analysis The StarCraft path-finding hack https://www.codeofhonor.com/blog/the-starcraft-path-finding-hack A* navigational mesh path finding https://gamedev.stackexchange.com/questions/20392/a-navigational-mesh-path-finding 相关论文 A Q-Learning Algorithm for Adversarial Real-Time Strategy Games https://www.aaai.org/ocs/index.php/AIIDE/AIIDE12/paper/download/5515/5734 StarCraft Unit Motion: Analysis and Search Enhancements https://www.aaai.org/ocs/index.php/AIIDE/AIIDE15/paper/download/11573/11384 MCTS library for unit movement planning in real-time strategy game Starcraft

To Be Marvelous

Yichang·Hubei