https://github.com/khmelnitskiianton/akinator
Akinator - game & database built on binary tree
https://github.com/khmelnitskiianton/akinator
akinator binary-tree
Last synced: 3 months ago
JSON representation
Akinator - game & database built on binary tree
- Host: GitHub
- URL: https://github.com/khmelnitskiianton/akinator
- Owner: khmelnitskiianton
- Created: 2023-11-22T21:39:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-01T09:42:04.000Z (over 1 year ago)
- Last Synced: 2025-01-20T21:11:32.005Z (4 months ago)
- Topics: akinator, binary-tree
- Language: C++
- Homepage:
- Size: 429 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Akinator
This is cool program that can generate data base on binary tree (yes/no)
You can upload data, guess elements or add them, see data(or log), take definition or compare objects, and save data, and vocalize all text with Festival!
## Table of Contents
- [Installation](#installation)
- [Extra programs](#extra-programs)
- [Commands and options](#commands-and-options)
- [Options of compiling](#options-of-compiling)
- [Myassert](#myassert)
- [Verificator](#verificator)
- [Logs](#logs)## Installation
To start program you need to use CMake and run program
1. Clone repository
2. Compile CMake, write command in main directory in repo
3. Run CMake (compile program), write command in main directory in repo
4. Run program(before you need to create this file)
```c
git clone https://github.com/khmelnitskiianton/Akinator.git
cd ./Akinator
cmake .
make
./akinator.exe .txt
```
5. Answer questions and work(or have fun) with Akinator!!!## Extra programs
1. Logs using Graphviz to vizualize binary tree!(you can turn them off)
```c
$ sudo apt install graphviz
```
2. Akinator use Festival to voice over all text!(you can turn it of)Program use voice overing with festival!
You can turn it off, undef `INCLUDE_FESTIVAL` in `./hdr/festival.h`
- If you have Linux install it:
```c
$ sudo apt install festival festvox-ru
```
- If you have Windows maybe you can install it, but easily use Linux
- If you have WSL may God help you
Take a chance with this guide `https://research.wmz.ninja/articles/2017/11/setting-up-wsl-with-graphics-and-audio.html`
If any errors search them in internet (I spent 2 days to connect audio in WSL with Windows with PulseAudio)
Start Pulse Audio on Win with flags `$ pulseaudio.exe --use-pid-file=false -D` (but its some peculiarity, check `https://github.com/aseering/wsl_gui_autoinstall/issues/8`)## Commands and options
0. First program ask you about uploading data base from file
Write `Д/Н` to do it or don't.1. `[У]гадать` You need to write `У`
This command guessing your object, while asking questions.
Answer `Д/Н`.
If object doesn't exist Akinator ask you to add object and it difference (So you can add objects like this).2. `[Д]ать определение` You nees to write `Д`
This command ask you name of object and gives you definition of object from data base.You need to enter its name, and its gives you full path.
3. `[С]равнить объекты` You nees to write `С`
This command ask you name of two objects and gives you their similar features and diffrences.
You need to enter two names.4. `[П]оказать дерево` You nees to write `П`
This command generates png picture of data base in `show_graph.png`
If you want svg file, open log.html with integrated vector graphic5. `[В]ыйти с сохранением или [Б]ез сохранения`
Write `В` to end programm with saving data base in txt file.
Write `Б` to end programm without saving data base.Thats all about working with Akinator!
## Options of compiling
INCLUDE_FESTIVAL
DEBUG_LOG
DEBUG_MYASSERT
DEBUG_VERIFY
## Myassert
`myassert.h`
Now it realized like MYASSERT() that take all errors with enum and write it to console
## Verificator
`verificator.cpp` `verificator.h`
Checking tree for loops and other errors. Functions returns EnumOfErrors
## Logs
`log.cpp` `log.h`
Logs use GraphViz to vizualized graphs in pictures
After generating image it includes to html file `log.html`
