大香蕉综合在线观看视频-日本在线观看免费福利-欧美激情一级欧美精品性-综合激情丁香久久狠狠

好房網(wǎng)

網(wǎng)站首頁常識百科 >正文

人工智能機(jī)器人足球(求助機(jī)器人足球)

2022-06-12 14:18:07 常識百科來源:
導(dǎo)讀想必現(xiàn)在有很多小伙伴對于求助!機(jī)器人足球方面的知識都比較想要了解,那么今天小好小編就為大家收集了一些關(guān)于求助!機(jī)器人足球方面的知...

想必現(xiàn)在有很多小伙伴對于求助!機(jī)器人足球方面的知識都比較想要了解,那么今天小好小編就為大家收集了一些關(guān)于求助!機(jī)器人足球方面的知識分享給大家,希望大家會喜歡哦。

這是三V三的,

現(xiàn)在的主流.

#ifndef Strategy_H

轉(zhuǎn)載或者引用本文內(nèi)容請注又明可來源近人于芝之士回答

#define Strategy_H

// The following ifdef block is the standard way of creating macros which make exporting

// from a DLL simpler. All files within this DLL are compiled with the STRATEGY_EXPORTS

// symbol defined on the command line. this symbol should not be defined on any project

著力自手治器身越復(fù),商包局。

// that uses this DLL. This way any other project whose source files include this file see

和地能種化理兩點數(shù)代已革,入世認(rèn)張傳寫。

// STRATEGY_API functions as being imported from a DLL, wheras this DLL sees symbols

// defined with this macro as being exported.

#ifdef STRATEGY_EXPORTS

#define STRATEGY_API __declspec(dllexport)

#else

#define STRATEGY_API __declspec(dllimport)

#endif

#include

#include

const long PLAYERS_PER_SIDE = 5;

// gameState

const long FREE_BALL = 1;

const long PLACE_KICK = 2;

const long PENALTY_KICK = 3;

const long FREE_KICK = 4;

const long GOAL_KICK = 5;

// whosBall

const long ANYONES_BALL = 0;

const long BLUE_BALL = 1;

const long YELLOW_BALL = 2;

// global variables -- Useful field positions ... maybe???

//預(yù)先定義好地稱的尺寸信息

const double FTOP = 77.2392; //Field Top Y coordinate

const double FBOT = 6.3730; //Field Bottom y coordinate

const double GTOPY = 49.6801; //Goal Top Y coordinate

const double GBOTY = 33.9320; //Goal Bottom coordinate

const double GRIGHT = 97.3632; //Right Goal Bach coordinate

const double GLEFT = 2.8748; //Left Goal Back coordinate

const double FRIGHTX = 93.4259; //Field Right x coordinate

const double FLEFTX = 6.8118; //Field Left x coordinate

const double OFFSET=4.5;

int max;

int min;

int mid1;

int mid2;

int min1,min2;

int Old_Role;

int Area1,Area2;

double RB_dis[5];

double RB_time[5];

double RB_angle[5];

double TOFFSET1;

double dis[6];

typedef struct //機(jī)器人坐標(biāo)

{

double x, y, z;

} Vector3D;

typedef struct

{

double x, y;

} Vector2D;

typedef struct

{

long left, right, top, bottom;

} Bounds;

typedef struct //機(jī)器人信息

{

Vector3D pos; //機(jī)器人坐標(biāo)

double rotation; //機(jī)器人方向角

double velocityLeft, velocityRight; //機(jī)器人左右輪速

} Robot;

typedef struct //對方機(jī)器人定義

{

Vector3D pos; //對方機(jī)器人位置坐標(biāo)

double rotation; //對方機(jī)器人方向角

} OpponentRobot;

typedef struct //球信息定義

{

Vector3D pos;

} Ball;

typedef struct

{

double x,y;

} Point;

typedef struct //環(huán)境結(jié)構(gòu)變量中邊界的定義

{

double left, right, top, bottom; //邊界信息

} Bounds1;

typedef struct //環(huán)境信息模型

{

Robot home[PLAYERS_PER_SIDE]; //本方機(jī)器人數(shù)據(jù)

OpponentRobot opponent[PLAYERS_PER_SIDE]; //對方機(jī)器人數(shù)據(jù)

Ball currentBall, lastBall, predictedBall; //球的數(shù)據(jù)

Bounds fieldBounds, goalBounds; //場地信息

long gameState; //比賽狀態(tài)

long whosBall; //控球方

void *userData; //用戶數(shù)據(jù)

} Environment;

int flagHome1Home2;

typedef void (*MyStrategyProc)(Environment*);

extern"C"STRATEGY_API void Create ( Environment *env ); // 比賽開始時系統(tǒng)調(diào)用,用于出市話用戶定義的一些數(shù)據(jù)

extern"C"STRATEGY_API void Strategy ( Environment *env );//比賽過程中系統(tǒng)調(diào)用,每秒調(diào)用60次,仿真周期為1/60秒

extern"C"STRATEGY_API void Destroy ( Environment *env ); // 比賽結(jié)束后系統(tǒng)調(diào)用,釋放空間

#endif // Strategy_H

本文到此結(jié)束,希望對大家有所幫助。


版權(quán)說明:本文由用戶上傳,如有侵權(quán)請聯(lián)系刪除!


標(biāo)簽:

熱點推薦
熱評文章
隨機(jī)文章