- 博客(132)
- 资源 (1)
- 收藏
- 关注
原创 老师AI用语言指导另一个徒弟AI进行工作
摘要:本文探讨了强化学习(RL)智能体间构建"语言"交流系统的可能性及其价值。通过数值向量表达策略意图,结合GPT等语言模型作为翻译中枢,AI可实现策略协同、知识共享和泛化能力提升。以五子棋AI为例,展示了智能体通过"建议向量"进行决策优化的过程。这种交流机制有望推动多智能体协作、AI教育和策略进化,使语言成为AI社会化的关键要素,开创智能体间理解协作的新纪元。
2025-08-05 16:55:33
367
原创 人脸识别还不够,我还要追踪。
本文介绍了一个基于YOLOv8人脸检测模型和ByteTrack多目标追踪算法的人脸识别系统。该系统能够实时检测和追踪视频流中的人脸,并与预加载的静态人脸图库进行比对识别,支持中文标注。项目采用Python开发,依赖OpenCV、face_recognition等库,在macOS环境下运行。实验数据显示系统平均CPU使用率为137.08%,内存占用753.04MB。项目已开源,提供完整的环境配置指南和使用说明,可用于实时人脸识别应用场景。
2025-08-05 14:07:34
427
原创 从绝望到登顶:MountainCar环境中的奖励重塑与DQN实战(含完整代码)
摘要:本文探讨如何通过奖励重塑与DQN结合解决MountainCar环境的强化学习难题。针对原始稀疏奖励(仅在登顶时给予奖励)导致学习效率低的问题,提出位置奖励、速度奖励和登顶奖励三种重塑策略。实验采用带目标网络同步的DQN模型,结果表明该方法显著提升了登顶成功率和训练效率。研究证明合理的奖励设计能有效引导智能体学习,为类似强化学习任务提供了参考方案。(149字)
2025-06-02 15:37:48
606
原创 人脑神经元的连接方式与视觉提取功能对深度学习的启发
ResNet通过模仿远距离连接实现了深层网络的稳定性,Transformer借鉴全局注意力机制优化了信息整合,RNN通过递归反馈机制再现了大脑动态交互的特性。未来,进一步理解人脑神经元的拓扑结构和功能机制,将为深度学习算法的创新提供更广阔的思路。人脑神经网络复杂的连接方式和高效的信息处理能力,为人工智能算法的设计提供了重要灵感。研究人脑神经元的连接特点,尤其是其反馈与递归结构,不仅能帮助理解大脑如何感知与认知,还能揭示深度学习模型(如ResNet、Transformer和RNN)的设计依据和优化方向。
2025-01-05 13:48:59
1330
原创 一些配置文件
# Add project specific ProGuard rules here.# You can control the set of applied configuration files using the# proguardFiles setting in build.gradle.## For more details, see# http://developer.android.com/guide/developing/tools/proguard.html# If y.
2022-02-05 11:15:29
251
转载 将activity切换到前台
val start = Intent(getApplicationContext(), AlertActivity::class.java)start.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)startActivity(start)并且在相应的Activity需要做如下部分配置android:launchMode="singleTop"...
2021-10-28 16:41:11
725
原创 使用GLSurfaceView绘制图片
<?xml version="1.0" encoding="utf-8"?><androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.c.
2021-01-20 11:56:30
1283
2
原创 BugLy热更新
classpath "com.tencent.bugly:tinker-support:1.2.0" implementation 'androidx.multidex:multidex:2.0.1'// 多dex配置 implementation 'com.tencent.bugly:crashreport_upgrade:latest.release' //1. 指定tinker依赖版本(注:应用升级1.3.5版本起,不再内置tinker) imp...
2021-01-13 13:30:42
232
原创 Pagging3
def paging_version = "3.0.0-alpha03" implementation "androidx.paging:paging-runtime:$paging_version" def lifecycle_version = "2.2.0" implementation 'com.amitshekhar.android:android-networking:1.0.2' // ViewModel implementation "...
2020-12-31 14:15:21
446
1
原创 高德地图 获得地理位置
高德地图获得地理位置import android.content.Contextimport com.amap.api.location.AMapLocationimport com.amap.api.location.AMapLocationClientimport com.amap.api.location.AMapLocationClientOptionimport com.amap.api.location.AMapLocationListener/** * 公司:江苏再
2020-12-30 15:23:38
586
原创 NasShaderUtil
package com.nas.nasgles.utils;import android.content.Context;import android.opengl.GLES20;import android.util.Log;import java.io.BufferedReader;import java.io.InputStream;import java.io.InputStreamReader;public class NasShaderUtil { public.
2020-11-20 10:02:11
166
原创 权限
implementation 'com.google.code.gson:gson:2.8.6' implementation 'com.github.tbruyelle:rxpermissions:0.12' implementation 'io.reactivex.rxjava3:rxandroid:3.0.0' implementation 'com.github.JiJiBo:BugUtils:1.1.15'
2020-11-11 10:10:40
190
原创 AndroidUtilCode
implementation 'com.blankj:utilcode:1.29.0'// if u use AndroidX, use the followingimplementation 'com.blankj:utilcodex:1.29.0'https://github.com/Blankj/AndroidUtilCode
2020-10-22 14:21:49
545
原创 ZxingUtils
ZxingUtils import android.graphics.Bitmapimport android.graphics.Canvasimport com.google.zxing.BarcodeFormatimport com.google.zxing.EncodeHintTypeimport com.google.zxing.WriterExceptionimport com.google.zxing.common.BitMatriximport com.google.zx
2020-10-22 10:23:16
544
原创 RetrofitCreater
implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0' implementation 'com.squareup.okhttp3:okhttp:4.8.0'package com.nas.http.tools.httpimport retrofit2.Retrofitimport retrofit...
2020-10-20 09:48:10
150
原创 安卓 系统修改时间监听
系统修改时间监听 private void registTimerReceiver() { IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_TIME_CHANGED); filter.addAction(Intent.ACTION_DATE_CHANGED); this.registerReceiver(new TimeChanged.
2020-10-10 10:13:14
1328
原创 读取文件
void WlFFmpeg::start() { //因为在加载中初始化了audio,所以这里有个检查 if (audio == NULL) { return; } //播放,设置opensl audio->play(); //读取数据,把数据从文件写入队列 while (playstatus != NULL && !playstatus->exit) { AVPacket *avPack.
2020-10-05 09:41:13
109
原创 opensles和ffmpeg
这个是得到jvm需要的方法extern "C"JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { jint result = -1; //得到jvm javaVM = vm; JNIEnv *env; if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) { return result; .
2020-09-20 13:08:50
307
原创 Ffmpeg + OpenSLES + Android 播放音频
一个类一个类介绍1BugCallJava//// Created by Administrator on 2020/9/10.//#ifndef MYCPP_BUGCALLJAVA_H#define MYCPP_BUGCALLJAVA_H#define MAIN_THILD 0#define CHILD_THILD 1extern "C" {#include "jni.h"};class BugCallJava {public: JavaVM *jvm;..
2020-09-10 14:15:38
201
原创 VLayout + 加载更多 用法
引入 implementation ('com.alibaba.android:vlayout:1.0.7@aar') { transitive = true }这是adapterpackage com.zcf.myvlayout;import android.view.LayoutInflater;import android.view.View;import android.view.ViewGroup;import androidx.an..
2020-09-10 13:04:18
384
原创 Ffmpeg + OpenSL ES + Android 播放音频
一拿到音频的路径 ,然后根据 jni 发送数据到C语言的方法然后,开始解析 avcodec_register_all(); avformat_network_init(); pPlayer->pFormatContext = avformat_alloc_context(); int openInput = avformat_open_input(&pPlayer->pFormatContext, url, NULL, NULL); .
2020-09-10 13:03:52
171
原创 一次打包失败bug修复记录
lintOptions { checkReleaseBuilds false // Or, if you prefer, you can continue to check for errors in release builds, // but continue the build even when errors are found: abortOnError false }加上这个就好了
2020-09-09 16:22:03
687
1
原创 jniOnLoad
extern "C"JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { jint result = -1; javaVm = vm; JNIEnv *env; if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) { return result; } return JNI_VERS...
2020-09-04 13:53:41
211
原创 DataBinding+ViewModel+LiveData+recyclerview
android下加这个 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } dataBinding { enabled = true }依赖 def lifecycle_version = "2.2.0" def arch_version = "..
2020-08-22 10:52:53
4544
原创 轮播图,支持自定义小点
布局文件,不用写viewpager <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:layout_width="match_parent" android:layo.
2020-07-13 17:42:00
313
原创 CustomViewPager 穷途末路时试试这个
import android.content.Context;import android.util.AttributeSet;import android.view.MotionEvent;import android.view.View;import androidx.annotation.NonNull;import androidx.annotation.Nullable;import androidx.viewpager.widget.ViewPager;public cla..
2020-07-11 16:40:05
291
原创 获取手机分配给app的最大内存是多少
private void getMaxMemoryInfo(){ Runtime rt = Runtime.getRuntime(); long maxMemory = rt.maxMemory(); Log.e("1123MaxMemory:", Long.toString(maxMemory/(1024*1024))); ActivityManager activityManager = (ActivityManager) get...
2020-07-10 18:09:46
522
原创 有用的框架
选择图片和拍照 implementation 'com.github.LuckSiege.PictureSelector:picture_library:v2.5.8'显示图片 implementation 'com.github.bumptech.glide:glide:4.11.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
2020-07-08 16:47:29
1232
原创 LimitUtils
权限判断表/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */packag...
2020-03-16 18:10:06
177
原创 如何在安卓X使用注解数据库
第一步,添加依赖 implementation "androidx.room:room-runtime:2.2.4" annotationProcessor "androidx.room:room-compiler:2.2.4"第二步,写一个pojo(我也不知道这个能不能叫pojo)做表1.类用@Entity修饰,里面写上tablename,对,一个Entity类就是...
2020-03-06 13:20:35
512
转载 安卓权限框架
Manifest文件添加权限声明<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />添加申请权限开源包依赖implementation 'com.afollestad:assent:2.3.1'申请权限及读写文件代码class MainActivit...
2020-02-27 14:08:50
930
原创 python pip conda
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple matplotlib
2020-02-22 17:35:38
250
原创 android 如何给不同大小的图片放入一个selector
下面是selector<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/vp_select" android:state_selected="true"></item> <it...
2020-02-14 19:21:37
735
转载 Android进入页面默认不弹出软键盘
转载https://blog.youkuaiyun.com/wxx_csdn/article/details/81567581在EditText外层任一布局加上android:focusable="true"android:focusableInTouchMode="true"你也可以直接加在xml的根布局上就OK了!!!!!!!!!!!!!!...
2020-01-17 11:08:14
436
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅