MCPcopy Create free account

hub / github.com/LYiHub/AR-Mahjong-Assistant-preview / functions

Functions193 in github.com/LYiHub/AR-Mahjong-Assistant-preview

↓ 46 callersMethodupdate_state
Update state based on hidden hand and explicit meld inputs. Args: new_hand_input: Current hidden hand (Top half
server/mahjong_state_tracker.py:147
↓ 8 callersMethodanalyze_opportunities
Analyze opportunities for a waiting state hand: - Win list (if tenpai) - Watch list (Pon/Kan/Chi) - Keep list (based
server/efficiency_engine.py:288
↓ 6 callersMethod_normalize_hand
Normalize input (hand or melds) to a list of 136-tile indices.
server/mahjong_state_tracker.py:88
↓ 6 callersMethodcalculate_best_discard
Calculate the best discard for a turn state hand. Args: hand_14: The current hidden hand (136-ID list). melds
server/efficiency_engine.py:90
↓ 6 callersFunctionget_db_connection
()
server/database.py:41
↓ 6 callersMethodupdate_visible_tiles
Update visible tiles based on external events (e.g. from voice analysis). Events format: [{"type": "DISCARD", "tile": "5s"}, ...]
server/mahjong_state_tracker.py:25
↓ 5 callersMethod_get_ukeire
Calculate Ukeire (effective tiles) considering global visible tiles. Returns: (total_count, list_of_tile_strings)
server/efficiency_engine.py:56
↓ 5 callersMethod_to_34_array
Convert 136-tile format list to 34-tile count array.
server/efficiency_engine.py:38
↓ 5 callersMethodrelease
(Context context)
rayneo arsdk for android doc/ExampleRecordTranslation.java:79
↓ 4 callersMethod_get_full_hand_34
Combine hidden hand and melds into a 34-tile count array.
server/efficiency_engine.py:46
↓ 4 callersMethodcreate
app/src/main/java/com/example/ai_assist/viewmodel/ChatViewModel.kt:89
↓ 3 callersMethod_get_diff_tiles
Calculate newly added tiles (new_list - old_list) based on 34-tile types. Returns a list of 136-IDs representing the added tiles.
server/mahjong_state_tracker.py:119
↓ 3 callersFunctionconvert_to_mpsz
Convert YOLO classes to MPSZ notation. Returns a tuple (hand_tiles, bonus_tiles).
server/main.py:91
↓ 3 callersMethoddetect_objects
Detect objects in an image file. Returns a list of dictionaries in the format: [ {'x': center_x, 'y': center_y, '
server/vision_service.py:37
↓ 3 callersFunctionformat_suggestions
Format the efficiency engine result into a user-friendly string. Args: engine_result: The dictionary returned by calculate_best_disca
server/efficiency_engine.py:454
↓ 3 callersMethodgenerate_lookup_table
Generate lookup table for all possible draws for a waiting state hand.
server/efficiency_engine.py:164
↓ 3 callersMethodstop
app/src/main/java/com/example/ai_assist/utils/RayNeoAudioRecorder.kt:160
↓ 2 callersMethod_simulate_meld_and_discard
Simulate declaring a meld (Pon/Chi) and finding the best discard. Args: full_hand_34: Current full hand counts.
server/efficiency_engine.py:233
↓ 2 callersFunctioncheck_alpha
(path)
tools/check_alpha.py:4
↓ 2 callersFunctioncreate_svg_wrapper
(png_path, svg_path)
tools/prepare_mahjong_svgs.py:37
↓ 2 callersFunctiondraw_bounding_boxes
Draw bounding boxes on the image and save to output_path. Assumes predictions have x, y (center), width, height.
server/vision_service.py:94
↓ 2 callersMethodinfer
Run inference on a frame
server/yolo_inference.py:93
↓ 2 callersMethodmapListToUnicode
app/src/main/java/com/example/ai_assist/utils/MahjongMapper.kt:47
↓ 2 callersMethodsetUp
(self)
server/tests/test_mahjong_tracker_advanced.py:6
↓ 2 callersMethodstart
(Context context, File recordingFile, int sampleRateInHz, int channelConfig, int audioFormat, int bufferSizeIn
rayneo arsdk for android doc/ExampleRecordTranslation.java:28
↓ 2 callersMethodstart
app/src/main/java/com/example/ai_assist/utils/RayNeoAudioRecorder.kt:38
↓ 1 callersMethodStartSub
(AudioRecord audioRecord, File recordingFile)
rayneo arsdk for android doc/ExampleRecordTranslation.java:59
↓ 1 callersMethod_generate_random_hand_from_34
Generate a random hand ensuring max 4 of each tile type.
server/tests/test_efficiency_simulation.py:18
↓ 1 callersMethod_initialize_model
(self)
server/vision_service.py:23
↓ 1 callersMethodanalyzeHand
app/src/main/java/com/example/ai_assist/service/GameApiService.kt:20
↓ 1 callersMethodanalyzeImage
app/src/main/java/com/example/ai_assist/repository/ChatRepository.kt:30
↓ 1 callersMethodanalyze_game_events
Analyze transcribed text to extract Mahjong game events. Returns a list of events like: [{"type": "DISCARD", "tile": "5s"}]
server/llm_service.py:22
↓ 1 callersFunctionbenchmark
()
server/performance_test.py:107
↓ 1 callersFunctiondraw_bounding_boxes
(image_path: str, predictions: list, output_path: str)
server/tests/test_drawing.py:13
↓ 1 callersMethodendCurrentSession
app/src/main/java/com/example/ai_assist/viewmodel/ChatViewModel.kt:61
↓ 1 callersMethodendSession
app/src/main/java/com/example/ai_assist/service/GameApiService.kt:34
↓ 1 callersFunctionformat_opportunities
(opportunities)
server/performance_test.py:43
↓ 1 callersFunctionmain
()
tools/prepare_mahjong_svgs.py:53
↓ 1 callersFunctionmain
()
server/camera_demo.py:7
↓ 1 callersFunctionmain
()
server/verify_hand.py:10
↓ 1 callersMethodmapToUnicode
app/src/main/java/com/example/ai_assist/utils/MahjongMapper.kt:29
↓ 1 callersFunctionmonitor_inactive_sessions
Background task to close inactive sessions every 60 seconds.
server/main.py:491
↓ 1 callersMethodonImageCaptured
app/src/main/java/com/example/ai_assist/service/RayNeoDeviceManager.kt:15
↓ 1 callersMethodonVoiceResult
app/src/main/java/com/example/ai_assist/service/RayNeoDeviceManager.kt:14
↓ 1 callersMethodpreprocess
Preprocess image: Letterbox resize, normalize, CHW
server/yolo_inference.py:57
↓ 1 callersMethodprocessAudio
app/src/main/java/com/example/ai_assist/service/GameApiService.kt:27
↓ 1 callersFunctionrun_complex_analysis
(engine)
server/performance_test.py:73
↓ 1 callersFunctionrun_test
()
server/tests/test_llm_connection.py:14
↓ 1 callersMethodstartNewSession
app/src/main/java/com/example/ai_assist/viewmodel/ChatViewModel.kt:56
↓ 1 callersMethodstartSession
app/src/main/java/com/example/ai_assist/service/GameApiService.kt:17
↓ 1 callersFunctiontest_analyze
()
server/verify_sample_2.py:9
↓ 1 callersFunctiontest_api
()
server/tests/test_api_conversion.py:8
↓ 1 callersFunctiontest_chi_details
()
server/tests/test_chi_details.py:10
↓ 1 callersFunctiontest_efficiency
()
test_efficiency.py:4
↓ 1 callersFunctiontest_gang_plus_discard
()
reproduce_issue.py:4
↓ 1 callersFunctiontest_workflow
()
server/verify_changes.py:8
↓ 1 callersMethodtranscribe
Transcribe audio file to text using faster-whisper. Raises Exception if STT fails or not available.
server/stt_service.py:34
↓ 1 callersMethoduploadAudio
app/src/main/java/com/example/ai_assist/viewmodel/ChatViewModel.kt:78
↓ 1 callersMethoduploadPhoto
app/src/main/java/com/example/ai_assist/viewmodel/ChatViewModel.kt:68
Method__init__
(self)
server/mahjong_state_tracker.py:14
Method__init__
(self)
server/efficiency_engine.py:7
Method__init__
(self, model="base", language="zh")
server/stt_service.py:15
Method__init__
Initialize YOLOv8 ONNX Inference Args: input_size: Optional tuple (width, height) to force specific inference si
server/yolo_inference.py:10
Method__init__
Initialize the Vision Service with a local YOLO model.
server/vision_service.py:11
Method__init__
(self, api_key: str = None, base_url: str = None, model: str = "gpt-4o")
server/llm_service.py:11
Methodaddition_isCorrect
app/src/test/java/com/example/ai_assist/ExampleUnitTest.kt:13
Functionanalyze_hand
( image: UploadFile = File(...), session_id: str = Form(...), incoming_tile: Optional[str] = Form(
server/main.py:149
MethodcheckPermissions
app/src/main/java/com/example/ai_assist/MainActivity.kt:143
MethodchooseOptimalSize
app/src/main/java/com/example/ai_assist/MainActivity.kt:522
MethodclearGameData
app/src/main/java/com/example/ai_assist/MainActivity.kt:401
MethodcloseCamera
rayneo arsdk for android doc/Camera_sample_code/CameraActivity.kt:230
MethodcloseCamera
app/src/main/java/com/example/ai_assist/MainActivity.kt:731
Functionclose_inactive_sessions
Close sessions that have been inactive for more than timeout_seconds. Returns list of closed session IDs.
server/database.py:150
MethodconfigureTransform
app/src/main/java/com/example/ai_assist/MainActivity.kt:453
Functionconvert_to_mpsz
(yolo_classes)
server/performance_test.py:23
Functioncreate_or_update_session
(session_id: str)
server/database.py:46
Functiondebug_yolo
( image: UploadFile = File(...), conf_threshold: float = Form(0.54), iou_threshold: float = Form(0
server/main.py:445
MethodendSession
app/src/main/java/com/example/ai_assist/repository/ChatRepository.kt:56
Functionend_session
(session_id: str)
server/database.py:70
Functionend_session
(request: EndSessionRequest)
server/main.py:424
MethodflushBufferToFile
app/src/main/java/com/example/ai_assist/utils/RayNeoAudioRecorder.kt:137
MethodformatMahjongText
app/src/main/java/com/example/ai_assist/MainActivity.kt:297
Functionget_all_sessions
()
server/database.py:107
Functionget_current_memory_mb
Get current memory usage in MB.
server/performance_test.py:37
Functionget_history_details
(session_id: str)
server/main.py:438
Functionget_history_sessions
()
server/main.py:434
Functionget_session_details
(session_id: str)
server/database.py:115
MethodhandleDoubleClick
app/src/main/java/com/example/ai_assist/MainActivity.kt:345
MethodhandleKeyEvent
app/src/main/java/com/example/ai_assist/service/RayNeoDeviceManager.kt:57
MethodhandleSwipeBackward
app/src/main/java/com/example/ai_assist/MainActivity.kt:390
MethodhandleSwipeForward
app/src/main/java/com/example/ai_assist/MainActivity.kt:369
MethodhandleTripleClick
app/src/main/java/com/example/ai_assist/MainActivity.kt:349
Methodhas_hidden
(idx)
server/efficiency_engine.py:381
MethodimageToBitmap
rayneo arsdk for android doc/Camera_sample_code/CameraActivity.kt:254
Functioninit_db
()
server/database.py:10
Functionlog_interaction
(session_id: str, image_path: str, steps: List[str], response: Dict)
server/database.py:84
MethodobserveViewModel
app/src/main/java/com/example/ai_assist/MainActivity.kt:248
MethodonConfigureFailed
rayneo arsdk for android doc/Camera_sample_code/CameraActivity.kt:223
MethodonConfigureFailed
app/src/main/java/com/example/ai_assist/MainActivity.kt:689
MethodonConfigured
rayneo arsdk for android doc/Camera_sample_code/CameraActivity.kt:218
next →1–100 of 193, ranked by callers