陶哲轩点破「天机」:不懂数学别想靠ChatGPT飞升!
新智元
共 12345字,需浏览 25分钟
·
2024-07-08 13:03
新智元报道
新智元报道
【新智元导读】冲锋在AI辅助数学研究第一线的陶哲轩,近日又有「神总结」:ChatGPT提升的,是我们在编码、图表等次要任务上的能力;而真要搞好数学研究,基础不扎实的话,AI也是没用的。
数学不好的人,其实AI的帮助可能也没那么大
pip install matplotlib
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
# Define the range for x
x = np.linspace(0, 1, 400)
# Define the functions
functions = [lambda x: x, lambda x: x**2, lambda x: x**3, lambda x: x**4]
# Create a figure and axis
fig, ax = plt.subplots()
line, = ax.plot(x, functions[0](x))
# Set axis labels and title
ax.set_xlabel('x')
ax.set_ylabel('f(x)')
ax.set_title('Animated Functions')
# Initialize the animation function
def init():
line.set_ydata([np.nan] * len(x))
return line,
# Update the animation function
def update(frame):
line.set_ydata(functions[frame](x))
ax.set_title(f'Function: $x^{frame+1}$')
return line,
# Create the animation
ani = animation.FuncAnimation(
fig, update, frames=len(functions), init_func=init, blit=True, repeat=True, interval=1000
)
# Save the animation as a gif
ani.save('animated_functions.gif', writer='imagemagick')
plt.show()
pip install matplotlib
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
# Define the range for x
x = np.linspace(0, 1, 400)
# Define the functions
functions = [lambda x: x, lambda x: x**2, lambda x: x**3, lambda x: x**4]
# Create a figure and axis
fig, ax = plt.subplots()
line1, = ax.plot(x, functions[0](x), label='$x$')
line2, = ax.plot(x, functions[1](x), label='$x^2$')
# Set axis labels and title
ax.set_xlabel('x')
ax.set_ylabel('f(x)')
ax.legend()
ax.set_title('Animated Functions')
# Initialize the animation function
def init():
line1.set_ydata([np.nan] * len(x))
line2.set_ydata([np.nan] * len(x))
return line1, line2
# Update the animation function
def update(frame):
line1.set_ydata(functions[frame](x))
line2.set_ydata(functions[frame+1](x))
ax.legend([f'$x^{frame+1}$', f'$x^{frame+2}$'])
return line1, line2
# Create the animation
ani = animation.FuncAnimation(
fig, update, frames=len(functions)-1, init_func=init, blit=True, repeat=True, interval=1000
)
# Save the animation as a gif
ani.save('animated_double_functions.gif', writer='imagemagick')
plt.show()
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
# Define the range for x
x = np.linspace(0, 1, 400)
# Define the functions
functions = [lambda x: x, lambda x: x**2, lambda x: x**3, lambda x: x**4]
# Create a figure and axis
fig, ax = plt.subplots()
line1, = ax.plot(x, functions[0](x), label='$x$')
line2, = ax.plot(x, functions[1](x), label='$x^2$')
# Set axis labels and title
ax.set_xlabel('x')
ax.set_ylabel('f(x)')
ax.set_title('Animated Functions')
# Initialize the animation function
def init():
line1.set_ydata([np.nan] * len(x))
line2.set_ydata([np.nan] * len(x))
return line1, line2
# Update the animation function
def update(frame):
line1.set_ydata(functions[frame](x))
line2.set_ydata(functions[frame+1](x))
ax.legend([f'$x^{frame+1}$', f'$x^{frame+2}$'])
return line1, line2
# Create the animation
ani = animation.FuncAnimation(
fig, update, frames=len(functions)-1, init_func=init, blit=True, repeat=True, interval=1000
)
# Save the animation as a gif
ani.save('animated_double_functions.gif', writer='imagemagick')
plt.show()
pip install matplotlib
import numpy as np
import matplotlib.pyplot as plt
# Define the numerical values for the x and y positions
x_values = [1, 2, 3]
y_values = [1, 4, 9]
# Define the corresponding string labels for x and y axes
x_labels = ["Today", "Next week", "Next year"]
y_labels = ["Beginner", "Intermediate", "Expert"]
# Define the function to be plotted (y = x^2)
x = np.linspace(1, 3, 100)
y = x**2
# Create a figure and axis
fig, ax = plt.subplots()
# Plot the function
ax.plot(x, y, label='$y=x^2$')
# Set the x and y axis labels
ax.set_xlabel('Time')
ax.set_ylabel('Level')
# Set the x and y axis tick positions and labels
ax.set_xticks(x_values)
ax.set_xticklabels(x_labels)
ax.set_yticks(y_values)
ax.set_yticklabels(y_labels)
# Add a legend
ax.legend()
# Set the title
ax.set_title('Parabola $y=x^2$ with Custom Axis Labels')
# Display the plot
plt.show()
网友:图表存在「幻觉」
「资深用户」陶哲轩
OK,自然数游戏已经完成,现在我要去安装Lean并编写一个「hello world」程序了。
评论