ITeye博客

zbx_py的博客

zbx_py · 共 10 篇文章

Ti5外卡赛模拟

前天一时兴起, 想用计算机模拟Ti5外卡赛和正赛来看看最后的结果如何,这样就能完成小金本的预测~ 现在记录一下一些有趣的东西。 外卡赛4只队伍CDEC, Vega, MVP 和 Archon, 问题的关键是如何模拟一场比赛的胜负。我最初的想法是查下有没有人研究过每支战队的MMR值与胜率之间的关系, 但是没有找到类似的结论。退而求其次, 我决定用MMR值作为一个基准,然后利用近3个月来战队之间相互战绩进行调整, 具体方案如下: http://www.joindota.com/en/edb/teams 这个使用points值作为战队排名的依据, 同时点开每支战队,可以查看近期的对战情况, 打开每…

2015-07-26 23:55 · 评论(1)

Unity3D入门(一) -- 环境搭建(2)

接上一节, 我们现在GameObject - 3DObject 选择quad, 将Inspector下属性positon 设置为(0, 0, 0),将Rotation的x设为90, 将Scale里x,y均设置为100.将quad重命名为Floor。 这么做的目的是, 我们想创建一个高度统一的平面。 由于我们之后要做RayCast, 但是由于地面有很多不平之处,碰撞处理不方便,我们就创建一个Floor用于碰撞处理。 接下来,这个设置的平面我们不想看到它,但是我们需要用它做碰撞处理。 所以我们保留inspector面板里的Mesh Collider, 删除Mesh Render。 然后点击Ins…

2015-07-25 22:04 · Unity3D · 评论(0)

Unity3D入门(一) -- (补充材料)光照

在Unity3D, 广义上分为两种光照 dynamic lighting 和 baked lighting. Dynamic lighting 是在游戏引擎运行时进行实时计算的, 而baked lighting 是预先计算好的光照,采用光照贴图(lighting texture map)的形式。 对于light component 共有4种不同的光照, spot light(聚光) , directional light(平行光), point light(点光或全向光), area light(面积光)(只用于baked lighting). 拉开Type下拉框, 可以进行选择, 其中: …

2015-07-25 11:25 · Unity3D · 评论(1)

Unity3D入门(一) -- 环境搭建

http://unity3d.com/learn/tutorials/projects/survival-shooter-project 初入门Unity3D, 现在将学习官网的tutorial过程记录一下~,上面的链接即官网给出的视频资料。 从搭建一个小型的射击类游戏学习入门Unity3D, 什么都还不懂, 请多多谅解。 Unity5的安装很简单, 直接在官网下载即可。 我们从零开始搭建这个project。首先创建一个新的项目 建立项目成功后, 选择右上角Layout下拉框, 选定2 by 3。 然后拖动project 面板至Hierarchy面板下方如图 (上图和下图有点错误,忘记将Di…

2015-07-23 12:57 · 评论(1)

Hihocoder --- 17周 LCA的在线算法

#include <iostream> #include <string> #include <map> #include <stack> #include <vector> #include <cstdlib> #include <stdio.h> using namespace std; string x[200005]; int weight[200005]; int segtree[200005][20]; string name[200005][20]; int mycount = 0, mleft = 0, mright = 0; map<string, int> last; t…

2014-10-26 12:20 · Hihocoder · 评论(0)

【转载】The diameter of the tree

http://www.quora.com/How-does-following-algorithm-for-finding-longest-path-in-tree-work 留作自己查看

2014-10-22 21:39 · 算法 · 评论(0)

Hihocoder --- 16周 RMG

#include <iostream> #include <cstdlib> #include <stdio.h> using namespace std; int weight[1000005]; int segtree[1000005][22]; int cal_pow(int x, int y){ if (y == 1) return x; else if (y == 0) return 1; if (y % 2 == 0){ int temp_value = cal_pow(x, y/2); return temp_value * temp_value; } else{ int te…

2014-10-20 16:55 · Hihocoder · 评论(0)

Hihocoder --- 15周 LCA

#include <iostream> #include <string> #include <map> #include <stack> #include <vector> using namespace std; map<string, string> represent; map<pair<string, string>, string> ans; pair<string, string> a[100005]; string find_represent(string x){ if (x == represent[x]) return x; else{ represent[x] = f…

2014-10-18 15:55 · Hihocoder · 评论(0)

算法概论 -- Chapter 0 Prologue

Fibonacci numbers: Introduction : F(n) = F(n-1) + F(n-2) , for n >= 2, and F(0) = 0, F(1) = 1 One approximation of F(n) is roughly , now I'm gonna prove it first. Promble: Find a constant c < 1 such that F(n) <= for all n >= 0 , and find the minimal c. proof : We use induction to prove it and intui…

2014-10-15 12:02 · 算法 · 评论(0)

Pyhon编程学习

--参考书目《Programming Python》(3rd Edition by Mark Lutz) Chapter2-----A Sneak Preview 这章旨在通过构建一个数据库来熟悉python操作和一些思想 Step 1:Representing Records 主要介绍了两种方法,list 和 dictionary,下逐一介绍 Using Lists: >>> XuHang = ['Mouse',19,'NJU','Software Engineering'] >>> XuYi = ['Duck',19,'HNU','Electronical Engineering'] >…

2013-11-27 12:11 · Python · 评论(0)