Coder Social home page Coder Social logo

millionhero's Introduction

教你用Java来玩答题(百万英雄/冲刺大会等)

MillionHero

今日头条的百万英雄答题助手

《百万英雄》是一档全民知识互动游戏,在《百万英雄》里每场12道题目全部回答正确的人,将瓜分奖金。 游戏模式

一共12道题,全部答对就可以平分奖金

如果可以把直播中的问题和答案提取出来,然后百度,然后统计一下哪个更相关,就可以辅助你答题了。 当然也可以直接把百度出来题目和答案都展示出来。本文用的第一种简单粗暴。

运行展示

工具介绍

  • JAVA8
  • Android 手机
  • Adb 驱动
  • TessOCR

原理说明

  1. 将手机点击到直播界面(在这里我们先打开一张图片);
  2. 用Adb 工具获取当前手机截图
  3. 用tessOCR进行图像识别,提取文字;
  4. 将文字中的问题和答案提取出来;
  5. 使用百度搜索并打开网页,然后统计搜索得到结果数量
  6. 计算pmi
  7. 选择pmi值最高的为答案。

该公式的依据来自于维基百科: https://en.wikipedia.org/wiki/Pointwise_mutual_information

使用步骤

相关软件工具安装和使用步骤请参考 Android操作步骤

PS:注意程序中的adb驱动目录要更换成自己的目录

我的屏幕是1920*1080,如果是别的分辨率,暂时需要修改一下代码中的图片参数等。

FAQ

更新日志

开发者列表

TODO

  • 可以增加一个图形化界面,分别对题目和答案进行搜索并进行展示。

QQ交流

  • 283616637(500人)

millionhero's People

Contributors

fengxiang-thu avatar gavinli369 avatar lingfengsan avatar xingchenxuanfeng avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.