1. Dherhion,
Open AI 3 es lo que se conoce como el mejor modelo de inteligencia artificial que hace cosas jamás creado... De forma resumida bastante cutre. Está en beta actualmente, y es jodido entrar. Yo eché una solicitud y me respondieron meses después, cuando me había olvidado de ello.
la idea principal es procesar lenguajes, pero hace mucho, mucho más. Es capaz de generar artículos, relatos coherentes... Le he estado metiendo caña y saca cosas bastante curiosas. De hecho, he recibido un aviso de que por favor no comparta según qué, pues me ha sacado un contenido Gore de la leche. Desde un artículo científico sobre hormigas hasta una ficha de rol, pasando por un juego extraño o un relato sobre un vendedor de cupones ciego de un ojo que acosa a ancianitas para explicarle qué es el amor. sí, como curiosidad, funciona en español.
Mirad con qué me completa el texto /* a simple game
Es brutal.
/* a simple game */
include <stdio.h>
include <time.h>
define STATE_TITLE 0
define STATE_INTRO 1
define STATE_PLAYING 2
define STATE_WINNER 3
define STATE_RUNNERUP 4
define STATE_LOSER 5
define STATE_GAME_OVER 6
define STATE_GAME_OVER_PROMPT 7
define NUM_ROUNDS 5
define MAX_PLAYERS 4
enum GameState {
STATE_TITLE,
STATE_INTRO,
STATE_PLAYING,
STATE_WINNER,
STATE_RUNNERUP,
STATE_LOSER,
STATE_GAME_OVER,
STATE_GAME_OVER_PROMPT,
};
/* the current game state */
enum GameState state;
/* the current player */
enum Player player;
/* the current player's score */
int score[MAX_PLAYERS];
/* the current player's x and y coordinates */
int x, y;
/* a player's current state */
enum PlayerState playerState;
/*------------------------------------------------------------------------*/
/*------------------------------------------------------------------------*/
/* main() */
/*------------------------------------------------------------------------*/
int main() {
/* set up the game */
state = STATE_TITLE;
printf("------------------------------------------------------------------------\n");
printf(" %s\n\n", "Fruit Salad");
printf(" %s\n\n", "a simple Fruit Salad game");
printf("------------------------------------------------------------------------\n");
printf(" \n");
printf("Your score is zero.\n");
printf("You have %d moves.\n", NUM_MOVES);
printf("Press ENTER to begin.\n\n");
getchar(); /* get a move from the player */
state = STATE_PLAYING;
/* process each move */
while (state == STATE_PLAYING) {
/* get a move from the player */
player = get_player();
printf("\n");
printf("What is your next move? \n");
printf("Enter a 0-3 to move that piece.\n");
printf("Enter a 4 to end your turn.\n");
printf("Enter anything else to abort your move.\n\n");
printf("\n");
scanf("%d", &player);
if (player != 0 && player != 4) {
/* process the move */
switch (player) {
case 0: x = 0; y = 0; playerState = PLAYER_RED; break;
case 1: x = 0; y = 0; playerState = PLAYER_BLUE; break;
case 2: x = 0; y = 0; playerState = PLAYER_GREEN; break;
case 3: x = 0; y = 0; playerState = PLAYER_YELLOW; break;
default: abort();
}
/* change the state */
state = processState(player, x, y, playerState);
}
}
return 0;
}
/*------------------------------------------------------------------------*/
/*--- end of main() ---*/
/*------------------------------------------------------------------------*/
/*--- the following function processes player input ---*/
/*--- and changes the game state accordingly ---*/
/*--- it is called by main() ---*/
/*------------------------------------------------------------------------*/
void processState(
enum Player player,
int x,
int y,
enum PlayerState playerState)
{
switch (state) {
case STATE_TITLE: {
printf("\n");
printf("You are in state %d.\n", state);
printf("Press ENTER to continue.\n\n");
break;
}
case STATE_INTRO: {
printf("\n");
printf("You are in state %d.\n", state);
printf("Press ENTER to continue.\n\n");
break;
}
case STATE_PLAYING: {
printf("\n");
printf("You are in state %d.\n", state);
printf("Press ENTER to continue.\n\n");
break;
}
case STATE_WINNER: {
printf("\n");
printf("You are in state %d.\n", state);
printf("Press ENTER to continue.\n\n");
break;
}
case STATE_RUNNERUP: {
printf("\n");
printf("You are in state %d.\n", state);
printf("Press ENTER to continue.\n\n");
break;
}
case STATE_LOSER: {
printf("\n");
printf("You are in state %d.\n", state);
printf("Press ENTER to continue.\n\n");
break;
}
case STATE_GAME_OVER: {
printf("\n");
printf("Game over.\n");
printf("Player %d wins!\n", player);
printf("Press ENTER to continue.\n\n");
break;
}
case STATE_GAME_OVER_PROMPT: {
printf("\n");
printf("Game over.\n");
printf("Press ENTER to restart.\n\n");
printf("Press ENTER to end.\n\n");
break;
}
default: abort();
}
}
/*--- end of processState() ---*/
void getchar() {
char ch;
while ( (ch = getchar()) != '\n') ;
}
/*--- end of getchar() ---*/
/*------------------------------------------------------------------------*/
/*--- the following functions handle the player input ---*/
/*--- they return a value which is used by processState() ---*/
/*--- to decide what move to make ---*/
/*------------------------------------------------------------------------*/
enum Player get_player()
{
static int playerNum;
/* check to see if the player has entered a number */
- if ( ( (strcmp(getchar(), "0")
0) ||
- (strcmp(getchar(), "1")
0) ||
- (strcmp(getchar(), "2")
0) ||
- (strcmp(getchar(), "3")
0)) &&
- (!(playerNum == 0 && getchar() == '4' ) )) {
/* the player entered a valid number */
if (playerNum == 0) {
playerNum = 1;
printf("You are now player %d.\n", playerNum);
}
else {
playerNum = 0;
printf("You are now player %d.\n", playerNum);
}
return playerNum;
}
/* else if the player entered a number but did not enter 4 */
else {
printf("\n");
printf("You did not enter a valid number.\n");
printf("Enter 0-3 to select a piece.\n");
printf("Enter 4 for a new game.\n\n");
printf("\n");
printf("Press ENTER to continue.\n\n");
getchar();
}
return 0;
}
void get_menu(void)
{
static int menuNum;
/* check to see if the player has entered a number */
- if ( ( (strcmp(getchar(), "0")
0) ||
- (strcmp(getchar(), "1")
0) ||
- (strcmp(getchar(), "2")
0) ||
- (strcmp(getchar(), "3")
0)) &&
- (!(menuNum == 0 && getchar() == '4' ) )) {
/* the player entered a valid number */
if (menuNum == 0) {
menuNum = 1;
printf("You are now player %d.\n", menuNum);
}
else {
menuNum = 0;
printf("You are now player %d.\n", menuNum);
}
return menuNum;
}
/* else if the player entered a number but did not enter 4 */
else {
printf("\n");
printf("You did not enter a valid number.\n");
printf("Press ENTER to continue.\n\n");
getchar();
}
}
/*--- end of get_menu() ---*/
/*--- end of getchar() ---*/
~msgScore~: +0